error[E0599]: no variant named `Baz` found for type `Foo` in the current scope --> $DIR/issue-28971.rs:19:13 | LL | enum Foo { | -------- variant `Baz` not found here ... LL | Foo::Baz(..) => (), | ^^^^^^^^^^^^ variant not found in `Foo` | = note: did you mean `Foo::Bar`? error: aborting due to previous error For more information about this error, try `rustc --explain E0599`.