We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25dba40 commit 2793da3Copy full SHA for 2793da3
compiler/rustc_passes/src/stability.rs
@@ -43,15 +43,14 @@ enum AnnotationKind {
43
/// have separate deprecation attributes from their parents, so we do not wish to inherit
44
/// deprecation in this case. For example, inheriting deprecation for `T` in `Foo<T>`
45
/// would cause a duplicate warning arising from both `Foo` and `T` being deprecated.
46
-#[derive(PartialEq, Copy, Clone)]
47
enum InheritDeprecation {
48
Yes,
49
No,
50
}
51
52
impl InheritDeprecation {
53
fn yes(&self) -> bool {
54
- *self == InheritDeprecation::Yes
+ matches!(self, InheritDeprecation::Yes)
55
56
57
0 commit comments