-
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
Strange extra type error after missing semicolon error #103425
Comments
It's trying to tell you nothing in particular. This is a bug, due to the fact that we eat the
|
That theory doesn't seem right to me, for two reasons:
fn f() -> f32 {
2_u32
3_i8
5.0
}
fn main() {
} gives two missing-semi errors and two type errors:
|
The error is reported at this point
Then it's considered as recovered, and the @compiler-errors |
@rustbot claim |
@chenyukang please first understand what the AST doing on the semicolon recovery path, then once that's done, you can probably try to make it recover like: |
…-diag, r=davidtwco Remove extra type error after missing semicolon error Fixes rust-lang#103425
…-diag, r=davidtwco Remove extra type error after missing semicolon error Fixes rust-lang#103425
…-diag, r=davidtwco Remove extra type error after missing semicolon error Fixes rust-lang#103425
Given the following code (playground):
The current output is:
What is this second error trying to tell me? What did it expect to be unit type and why? Does it make sense for this error to be emitted despite the first error correctly identifying my problem?
The text was updated successfully, but these errors were encountered: