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