rust/src/test/compile-fail/bad-bang-ann-3.rs

8 lines
199 B
Rust
Raw Normal View History

2011-05-20 19:53:50 -07:00
// -*- rust -*-
// Tests that a function with a ! annotation always actually fails
// error-pattern: some control paths may return
2011-07-27 14:19:39 +02:00
fn bad_bang(i: uint) -> ! { ret 7u; }
2011-05-20 19:53:50 -07:00
fn main() { bad_bang(5u); }