diff options
Diffstat (limited to 'tests/ui/reachable/expr_andand.rs')
-rw-r--r-- | tests/ui/reachable/expr_andand.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/reachable/expr_andand.rs b/tests/ui/reachable/expr_andand.rs new file mode 100644 index 000000000..d37eb0a3b --- /dev/null +++ b/tests/ui/reachable/expr_andand.rs @@ -0,0 +1,13 @@ +// 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() { } |