Skip to content

Commit 2d1b2a9

Browse files
committed
Add more weirdness to weird-exprs.rs
1 parent 02ad667 commit 2d1b2a9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/ui/weird-exprs.rs

+27
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,31 @@ fn infcx() {
231231
let _cx: cx::cx::Cx = cx::cx::cx::cx::cx::Cx;
232232
}
233233

234+
fn return_already() -> impl std::fmt::Debug {
235+
loop {
236+
return !!!!!!!
237+
break !!!!!!1111
238+
}
239+
}
240+
241+
fn cursed_macros() -> impl std::fmt::Debug {
242+
loop {
243+
if! {
244+
match! (
245+
break! {
246+
return! {
247+
1337
248+
}
249+
}
250+
)
251+
252+
{}
253+
}
254+
255+
{}
256+
}
257+
}
258+
234259
pub fn main() {
235260
strange();
236261
funny();
@@ -257,4 +282,6 @@ pub fn main() {
257282
semisemisemisemisemi();
258283
useful_syntax();
259284
infcx();
285+
return_already();
286+
cursed_macros();
260287
}

0 commit comments

Comments
 (0)