PageRenderTime 28ms CodeModel.GetById 20ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/jruderman/rust
Rust | 9 lines | 6 code | 2 blank | 1 comment | 0 complexity | f2984bf0251c10e4bdd60d3cb4c23cf5 MD5 | raw file
1// error-pattern:explicit failure
2
3fn foo(s: ~str) { }
4
5fn main() {
6    let i =
7        match some::<int>(3) { none::<int> => { fail } some::<int>(_) => { fail } };
8    foo(i);
9}