2014-03-21 18:05:05 -07:00
|
|
|
#![deny(unreachable_code)]
|
2014-10-27 15:37:07 -07:00
|
|
|
#![allow(unused_variables)]
|
2014-03-21 18:05:05 -07:00
|
|
|
#![allow(dead_code)]
|
2014-03-05 15:28:08 -08:00
|
|
|
|
2015-01-08 22:02:42 +11:00
|
|
|
fn fail_len(v: Vec<isize> ) -> usize {
|
2013-05-30 03:03:32 -05:00
|
|
|
let mut i = 3;
|
2014-10-09 15:17:22 -04:00
|
|
|
panic!();
|
2015-03-03 10:42:26 +02:00
|
|
|
for x in &v { i += 1; }
|
2013-05-30 03:03:32 -05:00
|
|
|
//~^ ERROR: unreachable statement
|
2012-08-01 17:30:05 -07:00
|
|
|
return i;
|
2012-04-07 17:11:33 -07:00
|
|
|
}
|
2013-01-31 17:51:01 -08:00
|
|
|
fn main() {}
|