Skip to content

Commit e66fdfd

Browse files
committed
test: add weird-exprs.rs case for 48 keywords in 300 characters
1 parent 4082d6a commit e66fdfd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/ui/expr/weird-exprs.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition:2024
12
//@ run-pass
23

34
#![feature(coroutines)]
@@ -271,6 +272,24 @@ fn fish_fight() {
271272
tug_o_war(<T>::_____________::<T>);
272273
}
273274

275+
// all 48 keywords in 300 characters
276+
#[allow(warnings)]
277+
mod x {
278+
pub(super) struct X;
279+
use Ok;
280+
impl X {
281+
pub(in crate) async fn x(self: Self, x: &'static &'_ dyn for<> Fn()) where {
282+
unsafe extern { safe fn x(); }
283+
macro_rules! x { () => {}; }
284+
if 'x: loop {
285+
return match while let true = break 'x false { continue } {
286+
ref x => { &raw mut x; async { const { enum A {} } }.await as () },
287+
};
288+
} { type x = X; } else { move || { trait x { }; union B { x: () } }; }
289+
}
290+
}
291+
}
292+
274293
pub fn main() {
275294
strange();
276295
funny();

0 commit comments

Comments
 (0)