Skip to content

Go to implementations should work on trait functions. #8537

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

Closed
umanwizard opened this issue Apr 15, 2021 · 3 comments · Fixed by #8988
Closed

Go to implementations should work on trait functions. #8537

umanwizard opened this issue Apr 15, 2021 · 3 comments · Fixed by #8988
Labels
A-assists S-actionable Someone could pick this issue up and work on it right now

Comments

@umanwizard
Copy link
Contributor

Feature request: "Go to Implementations" should work on trait functions.

E.g.:

trait Tr {
    fn f();
}

struct S;

impl Tr for S {
    fn f() {
        println!("Hello, world!");
    }
}

"Go to Implementations" on the trait's fn f(); should go to the implementation in S.

@DJMcNab
Copy link
Contributor

DJMcNab commented Apr 15, 2021

Probably duplicate of #4558

@umanwizard
Copy link
Contributor Author

That seems a bit different, if I'm understanding it correctly -- it's about going to the definition of a trait function from the call, rather than going to implementations from inside the trait definition.

@DJMcNab
Copy link
Contributor

DJMcNab commented Apr 15, 2021

Oh yeah, sorry. That's what I get for trying to triage at a late hour 😅

@lnicola lnicola added A-assists S-actionable Someone could pick this issue up and work on it right now labels Apr 16, 2021
bors bot added a commit that referenced this issue May 25, 2021
8988: feat: go to implementation on trait functions r=matklad a=lf-

Fix #8537.

GIF:
![output](https://user-images.githubusercontent.com/6652840/119501981-45a45c00-bd1e-11eb-8336-9145f2888643.gif)

Co-authored-by: Jade <[email protected]>
bors bot added a commit that referenced this issue May 25, 2021
8988: feat: go to implementation on trait functions r=matklad a=lf-

Fix #8537.

GIF:
![output](https://user-images.githubusercontent.com/6652840/119501981-45a45c00-bd1e-11eb-8336-9145f2888643.gif)

Co-authored-by: Jade <[email protected]>
@bors bors bot closed this as completed in 3e4dfaf May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assists 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