rust/tests/ui/borrowck/uninitalized-in-match-arm-issue-126133.rs

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

23 lines
259 B
Rust
Raw Normal View History

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() {}