Skip to content

feat: Hide type inlay hints for constructors #10441

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

Merged
merged 2 commits into from
Oct 3, 2021
Merged

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Oct 3, 2021

Hides type hints for let bindings if their type is the same as the qualifier for an inherent function including generics.
image

Fixes #3022
bors r+

bors bot added a commit that referenced this pull request Oct 3, 2021
10441: feat: Hide type inlay hints for constructors r=Veykril a=Veykril

Fixes #3022
bors r+

Co-authored-by: Lukas Wirth <[email protected]>
@bors
Copy link
Contributor

bors bot commented Oct 3, 2021

Canceled.

@Veykril
Copy link
Member Author

Veykril commented Oct 3, 2021

bors retry

@bors
Copy link
Contributor

bors bot commented Oct 3, 2021

@bors bors bot merged commit 10eaa5a into rust-lang:master Oct 3, 2021
@Veykril Veykril deleted the inlay2 branch October 3, 2021 13:49
bors bot added a commit that referenced this pull request Nov 13, 2021
10761: inlay hints: add the option to always show constructor inlay hints r=Veykril a=jhgg

This PR adds a config to *disable* the functionality in #10441 - _and makes that functionality disabled by default._

I actually *really* like inlay hints always showing up, and it helps a lot as a teaching tool too, and also it's quite reassuring to know that r-a indeed understands the code I've written. This PR adds the option `rust-analyzer.inlayHints.hideNamedConstructorHints` (i can also invert this to be `rust-analyzer.inlayHints.showNamedConstructorHints`, just let me know.)




Co-authored-by: Jake Heinz <[email protected]>
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

Successfully merging this pull request may close these issues.

Hide type hints for constructor return values
1 participant