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

10 lines
141 B
Rust
Raw Normal View History

2011-06-11 00:27:34 +00:00
// error-pattern:explicit failure
2011-06-11 00:27:34 +00:00
fn f() -> ! { fail }
2011-07-27 14:19:39 +02:00
fn g() -> int { let x = if true { f() } else { 10 }; ret x; }
2011-06-11 00:27:34 +00:00
fn main() { g(); }