mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
23 lines
259 B
Rust
23 lines
259 B
Rust
enum E {
|
|
A,
|
|
B,
|
|
C,
|
|
}
|
|
|
|
fn foo(e: E) {
|
|
let bar;
|
|
|
|
match e {
|
|
E::A if true => return,
|
|
E::A => return,
|
|
E::B => {}
|
|
E::C => {
|
|
bar = 5;
|
|
}
|
|
}
|
|
|
|
let _baz = bar; //~ ERROR E0381
|
|
}
|
|
|
|
fn main() {}
|