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

impl<'a, 'b> InvocationCollector<'a, 'b>[src]

fn collect(
    &mut self,
    fragment_kind: AstFragmentKind,
    kind: InvocationKind
) -> AstFragment
[src]

fn collect_bang(
    &mut self,
    mac: MacCall,
    span: Span,
    kind: AstFragmentKind
) -> AstFragment
[src]

fn collect_attr(
    &mut self,
    (attr, pos, derives): (Attribute, usize, Vec<Path>),
    item: Annotatable,
    kind: AstFragmentKind
) -> AstFragment
[src]

fn take_first_attr(
    &mut self,
    item: &mut impl AstLike
) -> Option<(Attribute, usize, Vec<Path>)>
[src]

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).

fn configure<T: AstLike>(&mut self, node: T) -> Option<T>[src]

fn check_attributes(&mut self, attrs: &[Attribute])[src]

Trait Implementations

impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.