Struct rustc_expand::hygiene::HygieneData [−][src]
pub struct HygieneData {
local_expn_data: IndexVec<LocalExpnId, Option<ExpnData>>,
local_expn_hashes: IndexVec<LocalExpnId, ExpnHash>,
foreign_expn_data: HashMap<ExpnId, ExpnData, BuildHasherDefault<FxHasher>>,
foreign_expn_hashes: HashMap<ExpnId, ExpnHash, BuildHasherDefault<FxHasher>>,
expn_hash_to_expn_id: HashMap<ExpnHash, ExpnId, BuildHasherDefault<Unhasher>>,
syntax_context_data: Vec<SyntaxContextData, Global>,
syntax_context_map: HashMap<(SyntaxContext, ExpnId, Transparency), SyntaxContext, BuildHasherDefault<FxHasher>>,
expn_data_disambiguators: HashMap<u64, u32, BuildHasherDefault<FxHasher>>,
}
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: HashMap<ExpnId, ExpnData, BuildHasherDefault<FxHasher>>
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: HashMap<ExpnId, ExpnHash, BuildHasherDefault<FxHasher>>
expn_hash_to_expn_id: HashMap<ExpnHash, ExpnId, BuildHasherDefault<Unhasher>>
syntax_context_data: Vec<SyntaxContextData, Global>
syntax_context_map: HashMap<(SyntaxContext, ExpnId, Transparency), SyntaxContext, BuildHasherDefault<FxHasher>>
expn_data_disambiguators: HashMap<u64, u32, BuildHasherDefault<FxHasher>>
Maps the local_hash
of an ExpnData
to the next disambiguator value.
This is used by update_disambiguator
to keep track of which ExpnData
s
would have collisions without a disambiguator.
The keys of this map are always computed with ExpnData.disambiguator
set to 0.
Auto Trait Implementations
impl !RefUnwindSafe for HygieneData
impl !Send for HygieneData
impl !Sync for HygieneData
impl Unpin for HygieneData
impl UnwindSafe for HygieneData
Blanket Implementations
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