summaryrefslogtreecommitdiffstats
path: root/src/test/ui/never_type/issue-52443.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/never_type/issue-52443.rs')
-rw-r--r--src/test/ui/never_type/issue-52443.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/never_type/issue-52443.rs b/src/test/ui/never_type/issue-52443.rs
new file mode 100644
index 000000000..cebcca944
--- /dev/null
+++ b/src/test/ui/never_type/issue-52443.rs
@@ -0,0 +1,14 @@
+fn main() {
+ [(); & { loop { continue } } ]; //~ ERROR mismatched types
+
+ [(); loop { break }]; //~ ERROR mismatched types
+
+ [(); {while true {break}; 0}];
+ //~^ WARN denote infinite loops with
+
+ [(); { for _ in 0usize.. {}; 0}];
+ //~^ ERROR `for` is not allowed in a `const`
+ //~| ERROR cannot convert
+ //~| ERROR mutable references are not allowed in constants
+ //~| ERROR cannot call non-const fn
+}