Skip to content

Commit 2793da3

Browse files
Avi-D-codervarkor
authored andcommitted
Update src/librustc_passes/stability.rs
Co-authored-by: varkor <[email protected]>
1 parent 25dba40 commit 2793da3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_passes/src/stability.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,14 @@ enum AnnotationKind {
4343
/// have separate deprecation attributes from their parents, so we do not wish to inherit
4444
/// deprecation in this case. For example, inheriting deprecation for `T` in `Foo<T>`
4545
/// would cause a duplicate warning arising from both `Foo` and `T` being deprecated.
46-
#[derive(PartialEq, Copy, Clone)]
4746
enum InheritDeprecation {
4847
Yes,
4948
No,
5049
}
5150

5251
impl InheritDeprecation {
5352
fn yes(&self) -> bool {
54-
*self == InheritDeprecation::Yes
53+
matches!(self, InheritDeprecation::Yes)
5554
}
5655
}
5756

0 commit comments

Comments
 (0)