Struct rustc_expand::expand::InvocationCollector [−][src]
struct InvocationCollector<'a, 'b> {
cx: &'a mut ExtCtxt<'b>,
cfg: StripUnconfigured<'a>,
invocations: Vec<(Invocation, Option<Lrc<SyntaxExtension>>)>,
monotonic: bool,
}
Fields
cx: &'a mut ExtCtxt<'b>
cfg: StripUnconfigured<'a>
invocations: Vec<(Invocation, Option<Lrc<SyntaxExtension>>)>
monotonic: bool
Implementations
fn collect_attr(
&mut self,
(attr, pos, derives): (Attribute, usize, Vec<Path>),
item: Annotatable,
kind: AstFragmentKind
) -> AstFragment
If item
is an attribute invocation, remove the attribute and return it together with
its position and derives following it. We have to collect the derives in order to resolve
legacy derive helpers (helpers written before derives that introduce them).
Trait Implementations
fn flat_map_foreign_item(
&mut self,
foreign_item: P<ForeignItem>
) -> SmallVec<[P<ForeignItem>; 1]>
Mutable token visiting only exists for the macro_rules
token marker and should not be
used otherwise. Token visitor would be entirely separate from the regular visitor if
the marker didn’t have to visit AST fragments in nonterminal tokens. Read more
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for InvocationCollector<'a, 'b>
impl<'a, 'b> !Send for InvocationCollector<'a, 'b>
impl<'a, 'b> !Sync for InvocationCollector<'a, 'b>
impl<'a, 'b> Unpin for InvocationCollector<'a, 'b> where
'b: 'a,
impl<'a, 'b> !UnwindSafe for InvocationCollector<'a, 'b>
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: 64 bytes