rust/tests/ui/reachable/expr_andand.rs
2023-01-11 09:32:08 +00:00

14 lines
242 B
Rust

// build-pass (FIXME(62277): could be check-pass?)
#![allow(unused_variables)]
#![allow(dead_code)]
#![deny(unreachable_code)]
fn foo() {
// No error here.
let x = false && (return);
println!("I am not dead.");
}
fn main() { }