In macro expansion section, explains why import and collections must be redone #1873
Labels
A-macros
Area: macros (general sense)
E-hard
Difficulty: might require advanced knowledge
I-terse
Issue: info is very terse
T-compiler
Relevant to compiler team
In https://rustc-dev-guide.rust-lang.org/macro-expansion.html , I'd suggest adding slightly more explanations to the part 2.1 and 2.2. I can guess why they are here but I admit I'm far from certains of being right.
2.1. I would have assume that you don't need to resolve imports at each iteration; that would be wasted work. The only exception I could think of would be if, while expanding a macro, you create new imports. But in this case, 2.4.3. may even consider this case with "integrating its output"
2.2. Similarly, I'd expect that all macro invocations were collected either at step 1, or or at 2.4.3. Unless there is a difference between "unresolved macro" and "macro invocation". In which, I'd really appreciate a clarification.
The text was updated successfully, but these errors were encountered: