From 2d1b2a9906be977d961d96f57dc67c8c9c9024f1 Mon Sep 17 00:00:00 2001 From: Jaro Fietz Date: Sat, 16 Dec 2023 23:32:24 +0100 Subject: [PATCH] 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 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(); }