Module rustc_passes::stability

source ·
Expand description

A pass that annotates every item and method with its stability level, propagating default levels lexically from parent to children ast nodes.

Structs

Enums

  • Whether to inherit const stability flags for nested items. In most cases, we do not want to inherit const stability: just because an enclosing fn is const-stable does not mean all extern imports declared in it should be const-stable! However, trait methods inherit const stability attributes from their parent and do not have their own.
  • Whether to inherit deprecation flags for nested items. In most cases, we do want to inherit 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.

Functions