Expand description
A bunch of methods and structures more or less related to resolving macros and
interface provided by Resolver to macro expander.
StructsΒ§
- Macro
Rules πBinding Binding produced by amacro_rulesitem. Not modularized, can shadow previousmacro_rulesbindings, etc.
EnumsΒ§
- Macro
Rules πScope The scope introduced by amacro_rules!macro. This starts at the macroβs definition and ends at the end of the macroβs parent module (named or unnamed), or even further if it escapes with#[macro_use]. Some macro invocations need to introducemacro_rulesscopes too because they can potentially expand into macro definitions.
FunctionsΒ§
- fast_
print_ πpath - registered_
tools π - sub_
namespace_ πmatch Macro namespace is separated into two sub-namespaces, one for bang macros and one for attribute-like macros (attributes, derives). We ignore resolutions from one sub-namespace when searching names in scope for another.
Type AliasesΒ§
- Macro
Rules πScope Ref macro_rules!scopes are always kept by reference and inside a cell. The reason is that we update scopes with valueMacroRulesScope::Invocation(invoc_id)in-place afterinvoc_idgets expanded. This helps to avoid uncontrollable growth ofmacro_rules!scope chains, which usually grow linearly with the number of macro invocations in a module (including derives) and hurt performance. - Res π