about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_passes/src/stability.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs
index dd453f28554..5b0df9e884f 100644
--- a/compiler/rustc_passes/src/stability.rs
+++ b/compiler/rustc_passes/src/stability.rs
@@ -43,7 +43,6 @@ enum AnnotationKind {
 /// have separate deprecation attributes from their parents, so we do not wish to inherit
 /// deprecation in this case. For example, inheriting deprecation for `T` in `Foo<T>`
 /// would cause a duplicate warning arising from both `Foo` and `T` being deprecated.
-#[derive(PartialEq, Copy, Clone)]
 enum InheritDeprecation {
     Yes,
     No,
@@ -51,7 +50,7 @@ enum InheritDeprecation {
 
 impl InheritDeprecation {
     fn yes(&self) -> bool {
-        *self == InheritDeprecation::Yes
+        matches!(self, InheritDeprecation::Yes)
     }
 }