PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/jruderman/rust
Rust | 9 lines | 4 code | 2 blank | 3 comment | 0 complexity | 772eeedab8809074fb1c6a2632fc1130 MD5 | raw file
1// -*- rust -*-
2// Tests that a function with a ! annotation always actually fails
3
4fn bad_bang(i: uint) -> ! {
5    return 7u;
6    //~^ ERROR expected `_|_` but found `uint`
7}
8
9fn main() { bad_bang(5u); }