blob: b41ce6fad8e572fe2f0e0b045dd3f648989dcf00 [file] [view]
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,
}
}
```