Update src/librustc_passes/stability.rs
Co-authored-by: varkor <github@varkor.com>
This commit is contained in:
parent
25dba40cbe
commit
2793da3f39
1 changed files with 1 additions and 2 deletions
|
@ -43,7 +43,6 @@ enum AnnotationKind {
|
||||||
/// have separate deprecation attributes from their parents, so we do not wish to inherit
|
/// 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>`
|
/// 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.
|
/// would cause a duplicate warning arising from both `Foo` and `T` being deprecated.
|
||||||
#[derive(PartialEq, Copy, Clone)]
|
|
||||||
enum InheritDeprecation {
|
enum InheritDeprecation {
|
||||||
Yes,
|
Yes,
|
||||||
No,
|
No,
|
||||||
|
@ -51,7 +50,7 @@ enum InheritDeprecation {
|
||||||
|
|
||||||
impl InheritDeprecation {
|
impl InheritDeprecation {
|
||||||
fn yes(&self) -> bool {
|
fn yes(&self) -> bool {
|
||||||
*self == InheritDeprecation::Yes
|
matches!(self, InheritDeprecation::Yes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue