rust/src/test/run-fail/alt-bot-fail.rs

10 lines
170 B
Rust
Raw Normal View History

2011-06-14 15:58:10 -05:00
// error-pattern:explicit failure
2011-07-27 07:19:39 -05:00
fn foo(s: str) { }
fn main() {
let i =
alt some::<int>(3) { none::<int> { fail } some::<int>(_) { fail } };
foo(i);
}