mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Invert token iteration order in macro mapping
This commit is contained in:
parent
ca3699bd50
commit
20ac30fb75
8 changed files with 33 additions and 25 deletions
|
@ -954,6 +954,10 @@ impl<'db> SemanticsImpl<'db> {
|
|||
};
|
||||
|
||||
while let Some((expansion, ref mut tokens)) = stack.pop() {
|
||||
// Reverse the tokens so we prefer first tokens (to accommodate for popping from the
|
||||
// back)
|
||||
// alternatively we could pop from the front but that would shift the content on every pop
|
||||
tokens.reverse();
|
||||
while let Some((token, ctx)) = tokens.pop() {
|
||||
let was_not_remapped = (|| {
|
||||
// First expand into attribute invocations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue