Skip to content

Do not show default types in function and closure return values #5466

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 1 commit into from
Jul 21, 2020

Conversation

SomeoneToIgnore
Copy link
Contributor

Avoid things like
image

@GrayJack
Copy link
Contributor

I actually like that it shows up the default types

@SomeoneToIgnore
Copy link
Contributor Author

SomeoneToIgnore commented Jul 21, 2020

Do you know any other cases when they are displayed? I'll gladly remove those too 😄

I personally don't think we should display the default generics at all, since they bloat the hints significantly with no immediate bonus to the reader.
Additionally, hover can display those already:
image

If you still want to display those in the hints, I think we'd better come up with a separate issue and good design due to the following reasons:

@GrayJack
Copy link
Contributor

GrayJack commented Jul 21, 2020

I personally don't think we should display the default generics at all, since they bloat the hints significantly with no immediate bonus to the reader.

Yeah, agree with that, that it should not show them in the inlay hints, I misinterpreted and thought you mean not show then at all in any form of hints, hover or inlay

@matklad
Copy link
Member

matklad commented Jul 21, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 21, 2020

@bors bors bot merged commit 9518e2f into rust-lang:master Jul 21, 2020
@SomeoneToIgnore SomeoneToIgnore deleted the less-default-types branch July 21, 2020 11:30
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.

3 participants