rust/src/test/ui/issues/issue-2150.rs
2018-12-25 21:08:33 -07:00

13 lines
244 B
Rust

#![deny(unreachable_code)]
#![allow(unused_variables)]
#![allow(dead_code)]
fn fail_len(v: Vec<isize> ) -> usize {
let mut i = 3;
panic!();
for x in &v { i += 1; }
//~^ ERROR: unreachable statement
return i;
}
fn main() {}