Closed
Description
Follow-up to #87960 (comment)
Given the following code:
enum Foo {
Bar { alpha: u8, bravo: u8, charlie: u8 },
}
fn foo(foo: Foo) {
match foo {
Foo::Bar {
alpha,
beta: "foo",
charlie
} => {}
}
}
The nightly output includes:
error[E0026]: variant `Foo::Bar` does not have a field named `beta`
--> src/lib.rs:9:13
|
9 | beta: "foo",
| ^^^^
| |
| variant `Foo::Bar` does not have this field
| help: `Foo::Bar` has a field named `bravo`
However, ideally, this suggestion shouldn't be present because of bravo: u8
.