-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Two-level type inference throws unhelpful E0308 #37632
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
To me, the
line is the worst part, though at least it does give the real error here:
|
(incoming tangential comment) Regarding:
Maybe we should add a debug assertion that both of the types in this error message are not equal. I don't see a valid scenario where we should display the same type on both lines. |
cc @GuillaumeGomez because of #37388 FYI, error with recent nightly is (see playground):
|
Hum, that might deserve another update once my current PR is merged. |
Maybe change the "variable" here to "value" (or "literal") if it's, you know, a literal value? (Should probably be a new issue if it doesn't exist yet.) |
Closing as fixed, I think the current error represents the problem well:
|
I have tried two level type inference from vector literal and got totally unhelpful E0308. While I would expect this to work, I file this report due to unhelpfulness of the error.
I expected vec2 alocation to succeed or complain about inability to to coerce types.
Actual error:
Code sample
Meta
rustc --version --verbose
rustc 1.11.0 (9b21dcd 2016-08-15)
binary: rustc
commit-hash: 9b21dcd
commit-date: 2016-08-15
host: x86_64-pc-windows-gnu
release: 1.11.0
The text was updated successfully, but these errors were encountered: