PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-fail/expr-if-fail-fn.rs

http://github.com/jruderman/rust
Rust | 9 lines | 3 code | 5 blank | 1 comment | 2 complexity | a8f10b3a85fd8e919811d39481ebfbed MD5 | raw file
1
2
3
4// error-pattern:explicit failure
5fn f() -> ! { fail }
6
7fn g() -> int { let x = if true { f() } else { 10 }; return x; }
8
9fn main() { g(); }