-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Overlapping spans in delimited meta-vars #118928
fix: Overlapping spans in delimited meta-vars #118928
Conversation
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
I have a PR in progress that removes this pile of hacks ( |
I'd have asked for a comment explaining the logic, but let's avoid the bother if this code is going away soon. |
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#118880 (More expressions correctly are marked to end with curly braces) - rust-lang#118928 (fix: Overlapping spans in delimited meta-vars) - rust-lang#119022 (Remove unnecessary constness from ProjectionCandidate) - rust-lang#119052 (Avoid overflow in GVN constant indexing.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#118928 - EliseZeroTwo:EliseZeroTwo/fix-issue-118786, r=cjgillot fix: Overlapping spans in delimited meta-vars Closes rust-lang#118786 Delimited meta-vars inside of MBE's spans were set to have the same opening and closing position resulting in an ICE when debug assertions were enabled and an error was present in the templated code. This ensures that the spans do not overlap, whilst still having the spans point at the usage of the meta-var inside the macro definition. It includes a regression test. 🖤
The branch taken in the match statement without this change set both the Sorry for not providing more of an explanation of the changes in my pull request, I will try to make more of an explanation of the changes in future PRs. |
Submitted in #119204. |
Closes #118786
Delimited meta-vars inside of MBE's spans were set to have the same opening and closing position resulting in an ICE when debug assertions were enabled and an error was present in the templated code.
This ensures that the spans do not overlap, whilst still having the spans point at the usage of the meta-var inside the macro definition.
It includes a regression test.
🖤