Skip to content

Shorten type hints for iterator #3750

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
matklad opened this issue Mar 27, 2020 · 0 comments · Fixed by #6154
Closed

Shorten type hints for iterator #3750

matklad opened this issue Mar 27, 2020 · 0 comments · Fixed by #6154
Labels
E-has-instructions Issue has some instructions and pointers to code to get started E-medium

Comments

@matklad
Copy link
Member

matklad commented Mar 27, 2020

image

This should display impl Iterator<Item = Token> I think (which, admitedly, is exactly the same number of characters). THe proper heuristic here I think is "A type from std::iter, and it implements Iterator"

The relevant code is here:
https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide/src/inlay_hints.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-has-instructions Issue has some instructions and pointers to code to get started E-medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant