Crate macro_magic_macros
source ·Macros§
- Creates an attribute proc macro that is an alias for
#[export_tokens]
. - Like
#[export_tokens]
but intead creates an alias for#[export_tokens_no_emit]
- “Forwards” the tokens of the specified exported item (specified by path as the first arg) to the specified proc or
macro_rules!
macro (specified by path as the second arg). - Allows you to import the tokens of an external item marked with
#[export_tokens]
whose path is already known at compile-time without having to do any additional parsing.
Attribute Macros§
- Can be applied to any item. Doing so will make the tokens for this item available for import by the other macros in this crate.
- Like
#[export_tokens]
but does not emit the tokens of the attached item locally. - Can be attached to an attribute proc macro function, causing it to receive the tokens for the external item referred to by the path provided as the
attr
/ first argument to the attribute macro. - An attribute macro that can be attached to a proc macro function definition that will cause it to receive the tokens of the external item referred to by its argument as input to your proc macro.
- use_attrDeprecatedDeprecated: No-op
- use_procDeprecatedDeprecated: No-op
- To be used in tandem with
#[import_tokens_attr]