Skip to content
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: Fix related documents diagnostics #18519

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

ChayimFriedman2
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 commented Nov 16, 2024

They were converted to LSP position using the current file's line index, which is obviously wrong.

I'm not sure how to test this since that require an entire operating r-a, since the functionality is in the rust-analyzer crate. I verified manually that this works.

The problem was introduced in #18404. Oopsie :)

Fixes #18513.

They were converted to LSP position using the current file's line index, which is obviously wrong.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 16, 2024
@lnicola lnicola added this pull request to the merge queue Nov 17, 2024
@lnicola
Copy link
Member

lnicola commented Nov 17, 2024

Ouch, this might warrant another beta backport.

Merged via the queue into rust-lang:master with commit ba56d9b Nov 17, 2024
9 checks passed
@ChayimFriedman2 ChayimFriedman2 deleted the invalid-offset branch November 17, 2024 11:55
@davidbarsky
Copy link
Contributor

I'm not sure how to test this since that require an entire operating r-a, since the functionality is in the rust-analyzer crate.

crates/rust-analyzer/slow-tests is a good spot to test protocol-level interactions like these!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic (Code: -32603) when editing proc-macro invocation
4 participants