diff options
Diffstat (limited to 'tests/ui/reachable/expr_oror.rs')
-rw-r--r-- | tests/ui/reachable/expr_oror.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/reachable/expr_oror.rs b/tests/ui/reachable/expr_oror.rs new file mode 100644 index 000000000..e95062de4 --- /dev/null +++ b/tests/ui/reachable/expr_oror.rs @@ -0,0 +1,12 @@ +// build-pass (FIXME(62277): could be check-pass?) + +#![allow(unused_variables)] +#![allow(dead_code)] +#![deny(unreachable_code)] + +fn foo() { + let x = false || (return); + println!("I am not dead."); +} + +fn main() { } |