mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
25 lines
320 B
Rust
25 lines
320 B
Rust
//@ run-pass
|
|
#![allow(dead_code)]
|
|
enum A {
|
|
A1,
|
|
A2,
|
|
A3,
|
|
}
|
|
|
|
enum B {
|
|
B1(String, String),
|
|
B2(String, String),
|
|
}
|
|
|
|
fn main() {
|
|
let a = A::A1;
|
|
loop {
|
|
let _ctor = match a {
|
|
A::A3 => break,
|
|
A::A1 => B::B1,
|
|
A::A2 => B::B2,
|
|
};
|
|
break;
|
|
}
|
|
}
|