rust/tests/ui/lint/dead-code/closure-bang.rs
2023-01-11 09:32:08 +00:00

10 lines
164 B
Rust

// ignore-test FIXME(#20574)
#![deny(unreachable_code)]
fn main() {
let x = || panic!();
x();
println!("Foo bar"); //~ ERROR: unreachable statement
}