about summary refs log tree commit diff
path: root/tests/ui/block-result/block-must-not-have-result-while.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/block-result/block-must-not-have-result-while.rs')
-rw-r--r--tests/ui/block-result/block-must-not-have-result-while.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/block-result/block-must-not-have-result-while.rs b/tests/ui/block-result/block-must-not-have-result-while.rs
new file mode 100644
index 00000000000..418059bf280
--- /dev/null
+++ b/tests/ui/block-result/block-must-not-have-result-while.rs
@@ -0,0 +1,6 @@
+fn main() {
+    while true { //~ WARN denote infinite loops with
+        true //~  ERROR mismatched types
+             //~| expected `()`, found `bool`
+    }
+}