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

pub(in expand) 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]

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

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

pub(in expand) fn collect_attr(
    &mut self,
    (attr, derives, after_derive): (Option<Attribute>, Vec<Path>, bool),
    item: Annotatable,
    kind: AstFragmentKind
) -> AstFragment
[src]

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

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

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

pub(in expand) fn take_first_attr_no_derive(
    &mut self,
    nonitem: &mut impl HasAttrs
) -> Option<(Option<Attribute>, Vec<Path>, bool)>
[src]

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

pub(in expand) fn configure<T: HasAttrs>(
    &mut self,
    node: T
) -> Option<T>
[src]

pub(in expand) 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.