Skip to content

Fix file range computation in macros #6765

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

Merged
merged 3 commits into from
Dec 8, 2020
Merged

Fix file range computation in macros #6765

merged 3 commits into from
Dec 8, 2020

Conversation

jonas-schievink
Copy link
Contributor

This also aligns the diagnostics behavior of TestDB with the one from the real IDE (by making the logic from semantics.rs a method on InFile<&SyntaxNode>), which makes bugs like this easier to find.

This should fix the misplaced diagnostics seen in #6747 and other issues.

bors r+

I believe this currently goes back all the way to the initial
user-written call, but that seems better than the current broken
behavior.
@bors
Copy link
Contributor

bors bot commented Dec 8, 2020

@bors bors bot merged commit 87e3500 into rust-lang:master Dec 8, 2020
@jonas-schievink jonas-schievink deleted the macro-file-ranges branch December 14, 2020 12:33
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.

1 participant