summaryrefslogtreecommitdiffstats
path: root/tests/ui/reachable/expr_box.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/reachable/expr_box.rs')
-rw-r--r--tests/ui/reachable/expr_box.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/reachable/expr_box.rs b/tests/ui/reachable/expr_box.rs
new file mode 100644
index 000000000..00328ea01
--- /dev/null
+++ b/tests/ui/reachable/expr_box.rs
@@ -0,0 +1,8 @@
+#![feature(box_syntax)]
+#![allow(unused_variables)]
+#![deny(unreachable_code)]
+
+fn main() {
+ let x = box return; //~ ERROR unreachable
+ println!("hi");
+}