Update src/librustc_passes/stability.rs

Co-authored-by: varkor <github@varkor.com>
This commit is contained in:
Avi Dessauer 2020-07-08 15:51:31 -04:00 committed by Jacob Hughes
parent 25dba40cbe
commit 2793da3f39

View File

@ -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)
}
}