From 2d1b2a9906be977d961d96f57dc67c8c9c9024f1 Mon Sep 17 00:00:00 2001 From: Jaro Fietz Date: Sat, 16 Dec 2023 23:32:24 +0100 Subject: [PATCH 1/2] Add more weirdness to weird-exprs.rs --- tests/ui/weird-exprs.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/ui/weird-exprs.rs b/tests/ui/weird-exprs.rs index 6d40d6377c5de..ba266c36fc195 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(); } From 98f59817c2cecbaafe47e0458e8281db51452ecd Mon Sep 17 00:00:00 2001 From: Jaro Fietz Date: Sun, 21 Jan 2024 13:47:45 +0100 Subject: [PATCH 2/2] Rename function in weird-exprs.rs for clarity --- tests/ui/weird-exprs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ui/weird-exprs.rs b/tests/ui/weird-exprs.rs index ba266c36fc195..748fe13c1e47a 100644 --- a/tests/ui/weird-exprs.rs +++ b/tests/ui/weird-exprs.rs @@ -238,7 +238,7 @@ fn return_already() -> impl std::fmt::Debug { } } -fn cursed_macros() -> impl std::fmt::Debug { +fn fake_macros() -> impl std::fmt::Debug { loop { if! { match! ( @@ -283,5 +283,5 @@ pub fn main() { useful_syntax(); infcx(); return_already(); - cursed_macros(); + fake_macros(); }