-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Type inference fails even though all types are known #58517
Comments
Bisecting releases says it worked in 1.12.0, broke in 1.13.0 |
Technically a stable regression, so marking as such - even though nobody seems to have been hit by it. It does pretty clearly look like a bug though. |
Ran This is still a pretty broad range... |
Only thing in that range that touches the typesystem seems to be #35883 |
May also be related to #35656 |
Ah, I missed that one. That might be more likely, yeah (since specialization might now be involved, but before wasn't). |
triage, P-medium. (Not a soundness issue, and appears to have a straight-forward if annoying work-around of introducing a local with an explicit type.) Leaving nominated label for discussion at next T-compiler meeting. |
Discussed briefuly at T-compiler meeting. assigning to self in attempt to ensure this doesn't just get lost. (I don't want to leave it nominated for discussion again at next week's meeting.) |
I would like to double-check the running hypothesis that this was caused by the addition of I briefly attempted to make a standalone test case that does not rely on
Anyway, while investigating the behavior of the test itself, here are some potentially interesting observations:
|
The output from #65951 might shed some light:
|
Seems to be due to specialization
|
Triage: original issue seems resolved, as the example provided in the original post now compiles. The latest example still won't compile. |
The following code fails to compile, even though all types are known
https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=8de9e57e8de5cd8f2896f422d693f453
The text was updated successfully, but these errors were encountered: