1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
enum Fruit {
Apple(String, String),
Pear(u32),
Orange((String, String)),
Banana(()),
}
fn main() {
let x = Fruit::Apple(String::new(), String::new());
match x {
Fruit::Apple(a) => {}, //~ ERROR E0023
Fruit::Apple(a, b, c) => {}, //~ ERROR E0023
Fruit::Pear(1, 2) => {}, //~ ERROR E0023
Fruit::Orange(a, b) => {}, //~ ERROR E0023
Fruit::Banana() => {}, //~ ERROR E0023
}
}
|