[−][src]Struct rustc_expand::expand::InvocationCollector

struct InvocationCollector<'a, 'b> {
    cx: &'a mut ExtCtxt<'b>,
    cfg: StripUnconfigured<'a>,
    invocations: Vec<(Invocation, Option<InvocationRes>)>,
    monotonic: bool,
}

Fields

cx: &'a mut ExtCtxt<'b>cfg: StripUnconfigured<'a>invocations: Vec<(Invocation, Option<InvocationRes>)>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: Option<Attribute>,
    derives: Vec<Path>,
    item: Annotatable,
    kind: AstFragmentKind,
    after_derive: bool
) -> AstFragment
[src]

fn find_attr_invoc(
    &self,
    attrs: &mut Vec<Attribute>,
    after_derive: &mut bool
) -> Option<Attribute>
[src]

fn classify_item(
    &mut self,
    item: &mut impl HasAttrs
) -> (Option<Attribute>, Vec<Path>, bool)
[src]

If item is an attr invocation, remove and return the macro attribute and derive traits.

fn classify_nonitem(
    &mut self,
    nonitem: &mut impl HasAttrs
) -> (Option<Attribute>, bool)
[src]

Alternative to classify_item() that ignores #[derive] so invocations fallthrough to the unused-attributes lint (making it an error on statements and expressions is a breaking change)

fn configure<T: HasAttrs>(&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.