mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
18 lines
441 B
Rust
18 lines
441 B
Rust
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
|
|
}
|
|
}
|