rust/tests/ui/error-codes/E0023.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
441 B
Rust
Raw Normal View History

2016-05-12 13:17:02 +00:00
enum Fruit {
Apple(String, String),
Pear(u32),
Orange((String, String)),
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
Fruit::Pear(1, 2) => {}, //~ ERROR E0023
Fruit::Orange(a, b) => {}, //~ ERROR E0023
Fruit::Banana() => {}, //~ ERROR E0023
2016-05-12 13:17:02 +00:00
}
}