-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Compile message contains reference to an identifier not used by the erraneous code #63852
Comments
|
@svenschmidt75 would the following output be enough for you to understand what was happening?
|
IMO it is better to see where the problem is coming from. But there is still no obvious connection between
|
It would probably help a lot if the message tells you what
|
@svenschmidt75 I've been looking at doing that but will require a much larger refactor to mention either |
Point at method call on missing annotation error Make it clearer where the type name that couldn't be inferred comes from. Before: ``` error[E0282]: type annotations needed --> src/test/ui/span/type-annotations-needed-expr.rs:2:13 | 2 | let _ = (vec![1,2,3]).into_iter().sum() as f64; //~ ERROR E0282 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `S` | = note: type must be known at this point ``` after ``` error[E0282]: type annotations needed --> src/test/ui/span/type-annotations-needed-expr.rs:2:39 | 2 | let _ = (vec![1,2,3]).into_iter().sum() as f64; //~ ERROR E0282 | ^^^ cannot infer type for `S` | = note: type must be known at this point ``` CC #63852.
This has improved in the mean time slightly:
I'm probably gonna close this because it suggests the turbofish and mentions that |
rustc 1.37.0 (eae3437 2019-08-13)
Repo: https://github.com/svenschmidt75/Rust
Commit: svenschmidt75/Rust@23ec342
When building, I get error message
Where does S come from?
Thanks,
The text was updated successfully, but these errors were encountered: