about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorJaro Fietz <jaro.fietz@gmx.de>2023-12-16 23:32:24 +0100
committeroberien <jaro.fietz@gmx.de>2023-12-16 23:44:00 +0100
commit2d1b2a9906be977d961d96f57dc67c8c9c9024f1 (patch)
tree48e695a841a8e1bd97986a559ba7c0580d0e7894 /tests/ui
parent02ad6676ddc7ea7bc3acd73f383180bc80185aeb (diff)
downloadrust-2d1b2a9906be977d961d96f57dc67c8c9c9024f1.tar.gz
rust-2d1b2a9906be977d961d96f57dc67c8c9c9024f1.zip
Add more weirdness to weird-exprs.rs
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/weird-exprs.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ui/weird-exprs.rs b/tests/ui/weird-exprs.rs
index 6d40d6377c5..ba266c36fc1 100644
--- a/tests/ui/weird-exprs.rs
+++ b/tests/ui/weird-exprs.rs
@@ -231,6 +231,31 @@ fn infcx() {
     let _cx: cx::cx::Cx = cx::cx::cx::cx::cx::Cx;
 }
 
+fn return_already() -> impl std::fmt::Debug {
+    loop {
+        return !!!!!!!
+        break !!!!!!1111
+    }
+}
+
+fn cursed_macros() -> impl std::fmt::Debug {
+    loop {
+        if! {
+            match! (
+                break! {
+                    return! {
+                        1337
+                    }
+                }
+            )
+
+            {}
+        }
+
+        {}
+    }
+}
+
 pub fn main() {
     strange();
     funny();
@@ -257,4 +282,6 @@ pub fn main() {
     semisemisemisemisemi();
     useful_syntax();
     infcx();
+    return_already();
+    cursed_macros();
 }