pub struct HygieneData {
    local_expn_data: IndexVec<LocalExpnId, Option<ExpnData>>,
    local_expn_hashes: IndexVec<LocalExpnId, ExpnHash>,
    foreign_expn_data: FxHashMap<ExpnId, ExpnData>,
    foreign_expn_hashes: FxHashMap<ExpnId, ExpnHash>,
    expn_hash_to_expn_id: UnhashMap<ExpnHash, ExpnId>,
    syntax_context_data: Vec<SyntaxContextData>,
    syntax_context_map: FxHashMap<(SyntaxContext, ExpnId, Transparency), SyntaxContext>,
    expn_data_disambiguators: FxHashMap<u64, u32>,
}

Fields§

§local_expn_data: IndexVec<LocalExpnId, Option<ExpnData>>

Each expansion should have an associated expansion data, but sometimes there’s a delay between creation of an expansion ID and obtaining its data (e.g. macros are collected first and then resolved later), so we use an Option here.

§local_expn_hashes: IndexVec<LocalExpnId, ExpnHash>§foreign_expn_data: FxHashMap<ExpnId, ExpnData>

Data and hash information from external crates. We may eventually want to remove these maps, and fetch the information directly from the other crate’s metadata like DefIds do.

§foreign_expn_hashes: FxHashMap<ExpnId, ExpnHash>§expn_hash_to_expn_id: UnhashMap<ExpnHash, ExpnId>§syntax_context_data: Vec<SyntaxContextData>§syntax_context_map: FxHashMap<(SyntaxContext, ExpnId, Transparency), SyntaxContext>§expn_data_disambiguators: FxHashMap<u64, u32>

Maps the local_hash of an ExpnData to the next disambiguator value. This is used by update_disambiguator to keep track of which ExpnDatas would have collisions without a disambiguator. The keys of this map are always computed with ExpnData.disambiguator set to 0.

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

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: 232 bytes