-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Show _ type #19871
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
Comments
Not sure I understand, do you have an example? |
A simpler one: let a: usize = vec![1, 2, 3];
// Ideally here, to show after the "_" the signature like "_ (usize)" or something like that
let b: Vec<_> = a
.into_iter()
.map(|x| x*x)
.collect() |
I think it'll be best if when hovering over a selection of type we'll show the real type, but unfortunately I'm not sure how to implement this, as we have no way to map between the |
D: no way! I personally, like the idea of see the code and see everything that we need, specially if there is several |
@latot for this specific need:
VScode will show the correct type for b. Not sure if this helps, and pretty sure you knew it already, but there it is. |
Hi! I think would be nice be able to see in the IDEs which type currently have the use of "", while some times is needed, I think some time is not always to guess what "" will be, for example on multiple map operations, we can use "_" because we know is implicit, but does not means also know well which is the type, specially if we change it in a prototype.
Also show this would helps readability!
The text was updated successfully, but these errors were encountered: