-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Improve error message when type is unknown #3723
Comments
Not critical for 0.6; de-milestoning |
Nominating for milestone 5, production-ready |
accepted for production ready |
Updated with the test case for #5124. |
Triage bump |
Another example is this snippet: fn main() {
let i = 1;
if (i % 3 || i % 5)
{
println("hello");
}
} repro.rs:3:8: 3:22 error: binary operation || cannot be applied to type Ideal error imo would be: |
we believe this is fixed, or at least the message quality has been improved. |
closing as believed to be fixed. |
This appears fixed by #11513 |
iter_exported_symbols: also walk used statics in local crate Since rust-lang#126938 got reverted, we need a different approach. Fixes rust-lang/miri#3722
Compiling this gives:
I'm guessing that the compiler hasn't inferred a type for
<VI0>
, but it should probably be more explicit about this fact rather than spitting out something that looks like a compiler error. Nothing fancy, it could just look like:(Here I'm presuming that a type like
<VI0>
is known to be integral, where this error occurs more generally it might say<V0>
, which should simply become<unknown type>
.)If this can happen in other error messages it should be improved there as well.
Here's a test case with another error message that would likely be improved by the fixing this bug:
Current output:
Suggested fixed output:
The text was updated successfully, but these errors were encountered: