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

Goto definition on macro-by-example call should jump to the macro arm that matches #4028

Closed
matklad opened this issue Apr 18, 2020 · 0 comments · Fixed by #16057
Closed

Goto definition on macro-by-example call should jump to the macro arm that matches #4028

matklad opened this issue Apr 18, 2020 · 0 comments · Fixed by #16057
Assignees
Labels
A-macro macro expansion E-hard fun A technically challenging issue with high impact S-actionable Someone could pick this issue up and work on it right now

Comments

@matklad
Copy link
Member

matklad commented Apr 18, 2020

macro_rules! m {
  (a) => ();
  (b) => (); // .. should land here
}

m!(b);  // goto def here ...

Not something we need to implement right now, but eventually I'd love to see this

@matklad matklad added E-hard fun A technically challenging issue with high impact labels Apr 18, 2020
@lnicola lnicola added the S-actionable Someone could pick this issue up and work on it right now label Jan 22, 2021
@Veykril Veykril added the A-macro macro expansion label May 25, 2022
@Veykril Veykril self-assigned this Dec 6, 2023
@bors bors closed this as completed in 08c706f Apr 18, 2024
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
Render matched macro arm on hover of macro calls

Fixes rust-lang/rust-analyzer#4028, its a different take on the idea. I don't like go to being changed here simply because we can't point the focus range on the name anymore as we usually do, and some editors might use this feature (and the focus range) for certain other things. We could instead add a new hover action for this to move to the arm directly (or maybe make `go to implementation` jump to the arm?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macro macro expansion E-hard fun A technically challenging issue with high impact S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants