Closed
Description
I tried the following code on Rust 1.76.0:
enum _Foo {
Bar
}
fn main() {
let _ = Foo::Bar;
}
I got the following error:
error[E0433]: failed to resolve: use of undeclared type `Foo`
--> src/main.rs:6:13
|
6 | let _ = Foo::Bar;
| ^^^ use of undeclared type `Foo`
|
help: an enum with a similar name exists, consider changing it
|
1 | enum Foo {
| ~~~
Note that the suggestion has stripped the leading _
character from the enum's name.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Name/path resolution done by `rustc_resolve` specificallyArea: Suggestions generated by the compiler applied by `cargo fix`Diagnostics: Confusing error or lint that should be reworked.Status: A Minimal Complete and Verifiable Example has been found for this issue