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

Support Go to definition in Hover when show substitution. #18799

Closed
lh123 opened this issue Dec 31, 2024 · 0 comments · Fixed by #18801
Closed

Support Go to definition in Hover when show substitution. #18799

lh123 opened this issue Dec 31, 2024 · 0 comments · Fixed by #18801
Assignees
Labels
C-feature Category: feature request

Comments

@lh123
Copy link
Contributor

lh123 commented Dec 31, 2024

mod A {
    pub(crate) struct Test;
}

mod B {
    pub(crate) struct Test;
}


fn test_substitution_hover<T>(t: T) {
    
}

fn test() {
    let a = A::Test;
    let b = B::Test;
    test_substitution_hover(a); // hover on test_substitution_hover show T = Test
    test_substitution_hover(b); // hover on test_substitution_hover show T = Test
}

In this case, the hover shows T = Test, which indeed causes confusion because we cannot differentiate between A::Test and B::Test via hover.

Displaying T = Test with the ability to click on Test to jump to its definition would help resolve this issue, while also showing the full definition of Test when hovering over it.

Specifically, something like the following could help:
Image
Image
Image

@lh123 lh123 added the C-feature Category: feature request label Dec 31, 2024
@roife roife self-assigned this Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants