Skip to content

"Jump to definition" should jump to a trait impl when the concrete type is known. #7754

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 Feb 22, 2021 · 2 comments

Comments

@umanwizard
Copy link
Contributor

Example program:

struct S(i32);

impl Default for S {
    fn default() -> Self {
        Self(42)
    }
}

fn main() {
    let s = S::default();
}

Jump-to-definition on the default call should (IMO) go to its implementation in the impl block, not in the definition of the Default trait.

@Veykril
Copy link
Member

Veykril commented Feb 22, 2021

I think this is a dupe of #4558

@flodiebold
Copy link
Member

Yes.

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

No branches or pull requests

3 participants