summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-2150.rs
blob: baa1dde0fc2e8ef152b25b07c4949b259256c33a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![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() {}