mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
13 lines
244 B
Rust
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() {}
|