You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Confusing "type annotations needed" for errorneous struct field type #68507
structFoo{x:Option<NotInScope>,}fnmain(){let f = Foo{x:None,};}
error[E0412]: cannot find type `NotInScope` in this scope
--> src/main.rs:2:15
|
2 | x: Option<NotInScope>,
| ^^^^^^^^^^ not found in this scope
error[E0282]: type annotations needed
--> src/main.rs:7:12
|
7 | x: None,
| ^^^^ cannot infer type for `T`
error: aborting due to 2 previous errors
This "type annotations needed" error is confusing, especially if the two error messages are apart.
Activity
Rollup merge of rust-lang#106302 - compiler-errors:terr-coerce-w-infe…
Auto merge of rust-lang#106302 - compiler-errors:terr-coerce-w-infer,…