Struct rustc_span::hygiene::HygieneData [−][src]
pub struct HygieneData {
expn_data: Vec<Option<ExpnData>>,
syntax_context_data: Vec<SyntaxContextData>,
syntax_context_map: FxHashMap<(SyntaxContext, ExpnId, Transparency), SyntaxContext>,
expn_data_disambiguators: FxHashMap<Fingerprint, u32>,
}Fields
expn_data: Vec<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.
syntax_context_data: Vec<SyntaxContextData>syntax_context_map: FxHashMap<(SyntaxContext, ExpnId, Transparency), SyntaxContext>expn_data_disambiguators: FxHashMap<Fingerprint, u32>Maps the Fingerprint 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
fn apply_mark(
&mut self,
ctxt: SyntaxContext,
expn_id: ExpnId,
transparency: Transparency
) -> SyntaxContextfn apply_mark_internal(
&mut self,
ctxt: SyntaxContext,
expn_id: ExpnId,
transparency: Transparency
) -> SyntaxContextTrait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for HygieneDataimpl !Send for HygieneDataimpl !Sync for HygieneDataimpl Unpin for HygieneDataimpl UnwindSafe for HygieneDataBlanket Implementations
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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: 112 bytes