| This error means that an attempt was made to match a struct type enum | |
| variant as a non-struct type: | |
| ```compile_fail,E0164 | |
| enum Foo { B { i: u32 } } | |
| fn bar(foo: Foo) -> u32 { | |
| match foo { | |
| Foo::B(i) => i, // error E0164 | |
| } | |
| } | |
| ``` | |
| Try using `{}` instead: | |
| ``` | |
| enum Foo { B { i: u32 } } | |
| fn bar(foo: Foo) -> u32 { | |
| match foo { | |
| Foo::B{i} => i, | |
| } | |
| } | |
| ``` |