2016-05-12 15:17:02 +02:00
|
|
|
enum Fruit {
|
|
|
|
Apple(String, String),
|
|
|
|
Pear(u32),
|
2019-09-19 22:12:05 +05:30
|
|
|
Orange((String, String)),
|
2019-09-24 22:42:45 +02:00
|
|
|
Banana(()),
|
2016-05-12 15:17:02 +02: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-07 00:26:31 -04:00
|
|
|
Fruit::Pear(1, 2) => {}, //~ ERROR E0023
|
2019-09-19 22:12:05 +05:30
|
|
|
Fruit::Orange(a, b) => {}, //~ ERROR E0023
|
2019-09-24 22:42:45 +02:00
|
|
|
Fruit::Banana() => {}, //~ ERROR E0023
|
2016-05-12 15:17:02 +02:00
|
|
|
}
|
|
|
|
}
|