KEMBAR78
fix: Improve diagnostic ranges for `macro_calls!` by Veykril · Pull Request #20160 · rust-lang/rust-analyzer · GitHub
Skip to content

Conversation

@Veykril
Copy link
Member

@Veykril Veykril commented Jul 3, 2025

We used to point to the entire macro call including its token tree if we couldn't upmap the diagnostic to the input This generally makes things very noisy as the entire macro call will turn red on errors. Instead, we now macro the path and ! (bang) token as the error source range which is a lot nicer on the eyes.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 3, 2025
@Veykril Veykril enabled auto-merge July 3, 2025 11:34
We used to point to the entire macro call including its token tree if we couldn't upmap the diagnostic to the input
This generally makes things very noisy as the entire macro call will turn red on errors.
Instead, we now macro the path and `!` (bang) token as the error source range which is a lot nicer on the eyes.
@Veykril Veykril force-pushed the push-pqvskktpnylu branch from 5dcd28b to 2480a42 Compare July 3, 2025 12:12
@Veykril Veykril added this pull request to the merge queue Jul 3, 2025
Merged via the queue into rust-lang:master with commit f14bf95 Jul 3, 2025
15 checks passed
@Veykril Veykril deleted the push-pqvskktpnylu branch July 3, 2025 12:35
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants