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 22:37:07 +00: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-02 00:30:05 +00:00
return i;
}
fn main() {}