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

After upgrading to v0.3.1791 "Go to definition" moves me to the first line of impl instead of the method name #16229

Closed
frederikhors opened this issue Jan 2, 2024 · 7 comments · Fixed by #16234
Assignees
Labels
A-ide general IDE features A-proc-macro proc macro C-bug Category: bug

Comments

@frederikhors
Copy link

frederikhors commented Jan 2, 2024

rust-analyzer version: v0.3.1791

rustc version: rustc 1.74.1 (a28077b28 2023-12-04)

After upgrading to v0.3.1791 "Go to definition" moves me to the first line of impl instead of the method name.

@frederikhors frederikhors added the C-bug Category: bug label Jan 2, 2024
@frederikhors frederikhors changed the title After upgrading to v0.3.1791 "Go to definition" moves me to the first lint of impl instead of the method name After upgrading to v0.3.1791 "Go to definition" moves me to the first line of impl instead of the method name Jan 2, 2024
@lnicola lnicola added the A-ide general IDE features label Jan 2, 2024
@Veykril
Copy link
Member

Veykril commented Jan 2, 2024

Are macros involved? Does this happen with any specific impl or all? We need more context here

@frederikhors
Copy link
Author

frederikhors commented Jan 2, 2024

The code is complex... I cannot right now create a complete reproduction. Sorry.

@Veykril Veykril added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Jan 2, 2024
@frederikhors
Copy link
Author

I noticed the problem is occurring when I use #[async_trait::async_trait] on impls.

So, with macros maybe?

@Veykril Veykril added A-proc-macro proc macro and removed S-unactionable Issue requires feedback, design decisions or is blocked on other work labels Jan 2, 2024
@Veykril
Copy link
Member

Veykril commented Jan 3, 2024

Yes the macro is most likely the cause, the mapping out of the proc-macro most likely goes to the call site for some reason, that should suffice to investigate.

@Veykril Veykril self-assigned this Jan 3, 2024
bors added a commit that referenced this issue Jan 3, 2024
fix: Fix focus range being discarded in attributes/derives when upmapping

Fixes #16229
bors added a commit that referenced this issue Jan 3, 2024
fix: Fix focus range being discarded in attributes/derives when upmapping

Fixes #16229
@bors bors closed this as completed in d987137 Jan 3, 2024
@frederikhors
Copy link
Author

@bors is this going to be released soon?

@Veykril
Copy link
Member

Veykril commented Jan 5, 2024

It is already on the nightly r-a (pre-)release, otherwise it will release on the stable release on monday.

@jayjose1
Copy link

still open for node runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ide general IDE features A-proc-macro proc macro C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants