-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Add location links for generic parameter type hints #21393
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
feat: Add location links for generic parameter type hints #21393
Conversation
Veykril
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also handle lifetime parameters here i think https://github.com/benodiwal/rust-analyzer/blob/641a62e776ea1c198efb1da9d0c453a3e49279e5/crates/hir-ty/src/display.rs#L184-L196
| check_expect( | ||
| InlayHintsConfig { type_hints: true, ..DISABLED_CONFIG }, | ||
| r#" | ||
| fn identity<T>(t: T) -> T { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets put a const parameter and lifetime parameter here as well to test them all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the tests
|
@Veykril added support for |
Veykril
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Closes #21010