pub struct Index {
    pub stab_map: FxHashMap<LocalDefId, Stability>,
    pub const_stab_map: FxHashMap<LocalDefId, ConstStability>,
    pub default_body_stab_map: FxHashMap<LocalDefId, DefaultBodyStability>,
    pub depr_map: FxHashMap<LocalDefId, DeprecationEntry>,
    pub implications: FxHashMap<Symbol, Symbol>,
}
Expand description

A stability index, giving the stability level for items and methods.

Fields

stab_map: FxHashMap<LocalDefId, Stability>

This is mostly a cache, except the stabilities of local items are filled by the annotator.

const_stab_map: FxHashMap<LocalDefId, ConstStability>default_body_stab_map: FxHashMap<LocalDefId, DefaultBodyStability>depr_map: FxHashMap<LocalDefId, DeprecationEntry>implications: FxHashMap<Symbol, Symbol>

Mapping from feature name to feature name based on the implied_by field of #[unstable] attributes. If a #[unstable(feature = "implier", implied_by = "impliee")] attribute exists, then this map will have a impliee -> implier entry.

This mapping is necessary unless both the #[stable] and #[unstable] attributes should specify their implications (both implies and implied_by). If only one of the two attributes do (as in the current implementation, implied_by in #[unstable]), then this mapping is necessary for diagnostics. When a “unnecessary feature attribute” error is reported, only the #[stable] attribute information is available, so the map is necessary to know that the feature implies another feature. If it were reversed, and the #[stable] attribute had an implies meta item, then a map would be necessary when avoiding a “use of unstable feature” error for a feature that was implied.

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don’t need to if the corresponding DepNode is anonymous). Read more
This method tries to recover the query key from the given DepNode, something which is needed when forcing DepNodes during red-green evaluation. The query system will only call this method if fingerprint_style() is not FingerprintStyle::Opaque. It is always valid to return None here, in which case incremental compilation will treat the query as having changed instead of forcing it. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 160 bytes