Skip to content

Commit 273267e

Browse files
authored
Unrolled build for #147112
Rollup merge of #147112 - nik-contrib:keyword-soup, r=jieyouxu all 48 keywords in just 300 characters new test case in, all 48 keywords in just 300 characters https://doc.rust-lang.org/reference/keywords.html
2 parents 772f380 + 0d658fe commit 273267e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/ui/keyword/soup.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//@ edition:2024
2+
//@ check-pass
3+
4+
#![allow(unused_imports)]
5+
#![allow(missing_abi)]
6+
#![allow(unused_macros)]
7+
#![allow(non_camel_case_types)]
8+
#![allow(unreachable_code)]
9+
#![allow(unused_variables)]
10+
#![allow(dead_code)]
11+
#![allow(unused_must_use)]
12+
13+
// all 48 keywords in 300 characters
14+
mod x {
15+
pub(super) struct X;
16+
use Ok;
17+
impl X {
18+
pub(in crate) async fn x(self: Self, x: &'static &'_ dyn for<> Fn()) where {
19+
unsafe extern { safe fn x(); }
20+
macro_rules! x { () => {}; }
21+
if 'x: loop {
22+
return match while let true = break 'x false { continue } {
23+
ref x => { &raw mut x; async { const { enum A {} } }.await as () },
24+
};
25+
} { type x = X; } else { move || { trait x { } union B { x: () } }; }
26+
}
27+
}
28+
}
29+
30+
fn main() {}

0 commit comments

Comments
 (0)