rust/tests/ui/issues/issue-2150.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
244 B
Rust
Raw Normal View History

#![deny(unreachable_code)]
2014-10-27 15:37:07 -07:00
#![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
2012-08-01 17:30:05 -07:00
return i;
}
fn main() {}