mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Merge pull request #18410 from Veykril/veykril/push-lvwxpnowqrxk
internal: Invert token iteration order in macro mapping
This commit is contained in:
commit
715b67c425
9 changed files with 67 additions and 58 deletions
|
@ -945,6 +945,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