-
Couldn't load subscription status.
- Fork 1.8k
Closed
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages
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... :)
Lokathor, tesuji and jakubadamw
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages