Update src/librustc_passes/stability.rs
Co-authored-by: varkor <github@varkor.com>
This commit is contained in:
parent
19e90843a4
commit
41eec9065a
1 changed files with 6 additions and 2 deletions
|
@ -37,8 +37,12 @@ enum AnnotationKind {
|
||||||
Container,
|
Container,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Inheriting deprecations Nested items causes duplicate warnings.
|
/// Whether to inherit deprecation flags for nested items. In most cases, we do want to inherit
|
||||||
/// Inheriting the deprecation of `Foo<T>` onto the parameter `T`, would cause a duplicate warnings.
|
/// deprecation, because nested items rarely have individual deprecation attributes, and so
|
||||||
|
/// should be treated as deprecated if their parent is. However, default generic parameters
|
||||||
|
/// 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)]
|
#[derive(PartialEq, Copy, Clone)]
|
||||||
enum InheritDeprecation {
|
enum InheritDeprecation {
|
||||||
Yes,
|
Yes,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue