2016-05-12 08:17:02 -05:00
|
|
|
enum Fruit {
|
|
|
|
Apple(String, String),
|
|
|
|
Pear(u32),
|
2019-09-19 11:42:05 -05:00
|
|
|
Orange((String, String)),
|
2019-09-24 15:42:45 -05:00
|
|
|
Banana(()),
|
2016-05-12 08:17:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = Fruit::Apple(String::new(), String::new());
|
|
|
|
match x {
|
|
|
|
Fruit::Apple(a) => {}, //~ ERROR E0023
|
|
|
|
Fruit::Apple(a, b, c) => {}, //~ ERROR E0023
|
2016-08-06 23:26:31 -05:00
|
|
|
Fruit::Pear(1, 2) => {}, //~ ERROR E0023
|
2019-09-19 11:42:05 -05:00
|
|
|
Fruit::Orange(a, b) => {}, //~ ERROR E0023
|
2019-09-24 15:42:45 -05:00
|
|
|
Fruit::Banana() => {}, //~ ERROR E0023
|
2016-05-12 08:17:02 -05:00
|
|
|
}
|
|
|
|
}
|