2019-07-27 00:54:25 +03:00
|
|
|
// run-pass
|
|
|
|
|
2014-10-09 15:17:22 -04:00
|
|
|
fn my_err(s: String) -> ! { println!("{}", s); panic!(); }
|
2011-05-20 19:53:50 -07:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn okay(i: usize) -> isize {
|
2015-03-03 10:42:26 +02:00
|
|
|
if i == 3 {
|
2014-05-25 03:17:19 -07:00
|
|
|
my_err("I don't like three".to_string());
|
2014-05-12 17:56:43 -07:00
|
|
|
} else {
|
|
|
|
return 42;
|
|
|
|
}
|
2011-05-20 19:53:50 -07:00
|
|
|
}
|
|
|
|
|
2015-03-03 10:42:26 +02:00
|
|
|
pub fn main() { okay(4); }
|