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
The compiler used to correctly suggest that a field was missing from the enum constructor:
error[E0063]: missing field `bad` in initializer of `inner::MyEnum`
--> src/main.rs:8:13
|
8 | let x = inner::MyEnum::EscapeSequence {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bad`
Instead, this happened:
Now the compiler erroneously reports:
error: cannot construct `MyEnum` with struct literal syntax due to inaccessible fields
--> src/main.rs:8:13
|
8 | let x = inner::MyEnum::EscapeSequence {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Code
I tried this code:
Playground
I expected to see this happen:
The compiler used to correctly suggest that a field was missing from the enum constructor:
Instead, this happened:
Now the compiler erroneously reports:
Version it worked on
It most recently worked on: Rust 1.47
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: