summaryrefslogtreecommitdiffstats
path: root/src/test/ui/panics/while-body-panics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/panics/while-body-panics.rs')
-rw-r--r--src/test/ui/panics/while-body-panics.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/panics/while-body-panics.rs b/src/test/ui/panics/while-body-panics.rs
new file mode 100644
index 000000000..2c05eb389
--- /dev/null
+++ b/src/test/ui/panics/while-body-panics.rs
@@ -0,0 +1,14 @@
+#![allow(while_true)]
+
+// run-fail
+// error-pattern:quux
+// ignore-emscripten no processes
+
+fn main() {
+ let _x: isize = {
+ while true {
+ panic!("quux");
+ }
+ 8
+ };
+}