[−][src]Struct rustc_expand::expand::MacroExpander
Fields
cx: &'a mut ExtCtxt<'b>monotonic: boolImplementations
impl<'a, 'b> MacroExpander<'a, 'b>[src]
pub fn new(cx: &'a mut ExtCtxt<'b>, monotonic: bool) -> Self[src]
pub fn expand_crate(&mut self, krate: Crate) -> Crate[src]
pub fn fully_expand_fragment(
&mut self,
input_fragment: AstFragment
) -> AstFragment[src]
&mut self,
input_fragment: AstFragment
) -> AstFragment
pub(in expand) fn error_derive_forbidden_on_non_adt(
&self,
derives: &[Path],
item: &Annotatable
)[src]
&self,
derives: &[Path],
item: &Annotatable
)
pub(in expand) fn resolve_imports(
&mut self
)[src]
&mut self
)
pub(in expand) fn collect_invocations(
&mut self,
fragment: AstFragment,
extra_placeholders: &[NodeId]
) -> (AstFragment, Vec<(Invocation, Option<InvocationRes>)>)[src]
&mut self,
fragment: AstFragment,
extra_placeholders: &[NodeId]
) -> (AstFragment, Vec<(Invocation, Option<InvocationRes>)>)
Collects all macro invocations reachable at this time in this AST fragment, and replace
them with "placeholders" - dummy macro invocations with specially crafted NodeIds.
Then call into resolver that builds a skeleton ("reduced graph") of the fragment and
prepares data for resolving paths of macro invocations.
pub(in expand) fn error_recursion_limit_reached(
&mut self
)[src]
&mut self
)
pub(in expand) fn error_wrong_fragment_kind(
&mut self,
kind: AstFragmentKind,
mac: &MacCall,
span: Span
)[src]
&mut self,
kind: AstFragmentKind,
mac: &MacCall,
span: Span
)
A macro's expansion does not fit in this fragment kind. For example, a non-type macro in a type position.
pub(in expand) fn expand_invoc(
&mut self,
invoc: Invocation,
ext: &SyntaxExtensionKind
) -> ExpandResult<AstFragment, Invocation>[src]
&mut self,
invoc: Invocation,
ext: &SyntaxExtensionKind
) -> ExpandResult<AstFragment, Invocation>
pub(in expand) fn gate_proc_macro_attr_item(
&self,
span: Span,
item: &Annotatable
)[src]
&self,
span: Span,
item: &Annotatable
)
pub(in expand) fn gate_proc_macro_input(
&self,
annotatable: &Annotatable
)[src]
&self,
annotatable: &Annotatable
)
pub(in expand) fn parse_ast_fragment(
&mut self,
toks: TokenStream,
kind: AstFragmentKind,
path: &Path,
span: Span
) -> AstFragment[src]
&mut self,
toks: TokenStream,
kind: AstFragmentKind,
path: &Path,
span: Span
) -> AstFragment
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for MacroExpander<'a, 'b>
impl<'a, 'b> !Send for MacroExpander<'a, 'b>
impl<'a, 'b> !Sync for MacroExpander<'a, 'b>
impl<'a, 'b> Unpin for MacroExpander<'a, 'b> where
'b: 'a,
'b: 'a,
impl<'a, 'b> !UnwindSafe for MacroExpander<'a, 'b>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,