File tree 1 file changed +19
-0
lines changed 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
//! Eager expansion related utils
2
+ //!
3
+ //! Here is a dump of a discussion from Vadim Petrochenkov about Eager Expansion and
4
+ //! Its name resolution :
5
+ //!
6
+ //! > Eagerly expanded macros (and also macros eagerly expanded by eagerly expanded macros,
7
+ //! > which actually happens in practice too!) are resolved at the location of the "root" macro
8
+ //! > that performs the eager expansion on its arguments.
9
+ //! > If some name cannot be resolved at the eager expansion time it's considered unresolved,
10
+ //! > even if becomes available later (e.g. from a glob import or other macro).
11
+ //!
12
+ //! > Eagerly expanded macros don't add anything to the module structure of the crate and
13
+ //! > don't build any speculative module structures, i.e. they are expanded in a "flat"
14
+ //! > way even if tokens in them look like modules.
15
+ //!
16
+ //! > In other words, it kinda works for simple cases for which it was originally intended,
17
+ //! > and we need to live with it because it's available on stable and widely relied upon.
18
+ //!
19
+ //!
20
+ //! See the full discussion : https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Eager.20expansion.20of.20built-in.20macros
2
21
3
22
use crate :: {
4
23
ast:: { self , AstNode } ,
You can’t perform that action at this time.
0 commit comments