rust/src/test/run-pass/expr-alt-fail-all.rs

13 lines
259 B
Rust
Raw Normal View History

// When all branches of an alt expression result in fail, the entire
// alt expression results in fail.
fn main() {
2011-07-27 07:19:39 -05:00
let x =
alt true {
2012-08-03 21:59:04 -05:00
true => { 10 }
false => { alt true { true => { fail } false => { fail } } }
};
}