Closed
Description
Since Rust 1.37.0 (hits stable on August 15th 2019) it is possible to use Self::
inside implementations to refer to variants of the Self
type. This was stabilized in rust-lang/rust#61682 (see it for tests).
Similar to the suggestion to match and construct via Self(...)
or Self { ... }
it would be likewise good to suggest matching and constructing through Self::Variant
where applicable. This seems consistent with Clippy's sensibilities... :)