pub struct MacroCtx<'r> {
pub line: u32,
pub span: Span,
/* private fields */
}Expand description
Context passed to every macro expand invocation: gives access to
the gensym counter (for hygienic identifier minting) and a back-
reference to the registry (so a macro can call other macros
programmatically — @if uses this to expand its chosen arm).
Fields§
§line: u32Line of the @name invocation, for error attribution.
span: SpanSource span of the invocation (@ byte through last )/}),
for Token::describe slicing on synthesized tokens.
Implementations§
Auto Trait Implementations§
impl<'r> !RefUnwindSafe for MacroCtx<'r>
impl<'r> !Send for MacroCtx<'r>
impl<'r> !Sync for MacroCtx<'r>
impl<'r> !UnwindSafe for MacroCtx<'r>
impl<'r> Freeze for MacroCtx<'r>
impl<'r> Unpin for MacroCtx<'r>
impl<'r> UnsafeUnpin for MacroCtx<'r>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more