about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-01-23 21:19:52 +0100
committerGitHub <noreply@github.com>2024-01-23 21:19:52 +0100
commite8f9e5481e3418d0525c4d54e61630391075c31d (patch)
treebe2a60dd502872aafa7005d022448a2c138955cf /tests
parentdfe53afaebd817f334d8ef9dc75a5cd2562cf6e6 (diff)
parent98f59817c2cecbaafe47e0458e8281db51452ecd (diff)
downloadrust-e8f9e5481e3418d0525c4d54e61630391075c31d.tar.gz
rust-e8f9e5481e3418d0525c4d54e61630391075c31d.zip
Rollup merge of #119028 - oberien:patch-1, r=cjgillot
Add more weirdness to weird-exprs.rs
Diffstat (limited to 'tests')
-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..748fe13c1e4 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 fake_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();
+    fake_macros();
 }