2011-05-20 21:53:50 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
// Tests that a function with a ! annotation always actually fails
|
|
|
|
|
2012-03-25 00:15:34 -05:00
|
|
|
fn bad_bang(i: uint) -> ! {
|
2012-08-01 19:30:05 -05:00
|
|
|
return 7u;
|
2012-06-30 06:23:59 -05:00
|
|
|
//~^ ERROR expected `_|_` but found `uint`
|
2012-03-25 00:15:34 -05:00
|
|
|
}
|
2011-05-20 21:53:50 -05:00
|
|
|
|
2011-08-19 17:16:48 -05:00
|
|
|
fn main() { bad_bang(5u); }
|