mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
20 lines
271 B
Rust
20 lines
271 B
Rust
enum E {
|
|
A,
|
|
B,
|
|
C,
|
|
D,
|
|
E,
|
|
F,
|
|
}
|
|
|
|
fn main() {
|
|
match E::F {
|
|
E::A => 1,
|
|
E::B => 2,
|
|
E::C => 3,
|
|
E::D => 4,
|
|
E::E => unimplemented!(""),
|
|
E::F => "", //~ ERROR `match` arms have incompatible types
|
|
};
|
|
}
|