Type Definition rustc_resolve::macros::MacroRulesScopeRef

source ·
pub(crate) type MacroRulesScopeRef<'a> = Interned<'a, Cell<MacroRulesScope<'a>>>;
Expand description

macro_rules! scopes are always kept by reference and inside a cell. The reason is that we update scopes with value MacroRulesScope::Invocation(invoc_id) in-place after invoc_id gets expanded. This helps to avoid uncontrollable growth of macro_rules! scope chains, which usually grow linearly with the number of macro invocations in a module (including derives) and hurt performance.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 8 bytes