-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Partial type hint breakage #12909
Comments
Maybe partial type hints need feature gating. |
I knew that feature was too easy to implement... Lets see if I can find the cause. |
Well, I'm not sure how to fix this. This inference error implies to me that partial type hints actually don't work at all for the According to @eddyb this is because the While there is a |
@alexcrichton Any idea why there are so many |
I expect that there would be other ways of hitting these same inference bugs. |
This snippet is working on 0.12 and master: use std::collections::HashMap;
fn main() {
let s = [(1i, 1u), (2, 2), (3, 3)];
let v: Vec<_> = s.iter().collect();
let m: HashMap<_, _> = s.iter().map(|&x| x).collect();
} I'm sure one of @nikomatsakis' PR that got merged in the last two months fixed inference from partial hints. Not sure which one though. I think this should be closed. (Unless someone got another test case that fails to infer from partial hints) |
💃 I've been meaning to look into why this doesn't work. Happy to not have to. |
Closes #11384 Closes #12909 r? @nikomatsakis
This is a minimal reproduction of something I saw when updating some of my projects to use
Vec
.This manifested in other ways in larger programs, ICEing in one case:
This can be reproduced by taking sfackler/rust-postgres@c5abe8c and changing lines 592 and 598 of src/lib.rs to use partial type hints.
cc @Kimundi
The text was updated successfully, but these errors were encountered: