diff options
| author | Avi Dessauer <avi.the.coder@gmail.com> | 2020-07-08 15:51:31 -0400 |
|---|---|---|
| committer | Jacob Hughes <j@jacobhughes.me> | 2020-09-22 21:55:38 -0400 |
| commit | 2793da3f39033d7f0b2c07a3556d68ccd4d03d4e (patch) | |
| tree | 32112fa753ea80d40696192a7b436ebea059cda6 | |
| parent | 25dba40cbee4161709fba653c5f3915a7ac87537 (diff) | |
| download | rust-2793da3f39033d7f0b2c07a3556d68ccd4d03d4e.tar.gz rust-2793da3f39033d7f0b2c07a3556d68ccd4d03d4e.zip | |
Update src/librustc_passes/stability.rs
Co-authored-by: varkor <github@varkor.com>
| -rw-r--r-- | compiler/rustc_passes/src/stability.rs | 3 |
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) } } |
