diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-09-29 11:56:43 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-29 11:56:43 +1000 |
| commit | f74aa5aa6ff693ea782cc5c8e7f2d8f6bf1f7029 (patch) | |
| tree | 5894fbcf2393998735af1aef5465b3667eabbfba | |
| parent | 01b172ef33ff2aaaa11ed36cfed7cceedc214423 (diff) | |
| parent | 0d658fe156c077e0f37068d5788f6c375d555b54 (diff) | |
| download | rust-f74aa5aa6ff693ea782cc5c8e7f2d8f6bf1f7029.tar.gz rust-f74aa5aa6ff693ea782cc5c8e7f2d8f6bf1f7029.zip | |
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
| -rw-r--r-- | tests/ui/keyword/soup.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/ui/keyword/soup.rs b/tests/ui/keyword/soup.rs new file mode 100644 index 00000000000..c4dbe3fb483 --- /dev/null +++ b/tests/ui/keyword/soup.rs @@ -0,0 +1,30 @@ +//@ edition:2024 +//@ check-pass + +#![allow(unused_imports)] +#![allow(missing_abi)] +#![allow(unused_macros)] +#![allow(non_camel_case_types)] +#![allow(unreachable_code)] +#![allow(unused_variables)] +#![allow(dead_code)] +#![allow(unused_must_use)] + +// all 48 keywords in 300 characters +mod x { + pub(super) struct X; + use Ok; + impl X { + pub(in crate) async fn x(self: Self, x: &'static &'_ dyn for<> Fn()) where { + unsafe extern { safe fn x(); } + macro_rules! x { () => {}; } + if 'x: loop { + return match while let true = break 'x false { continue } { + ref x => { &raw mut x; async { const { enum A {} } }.await as () }, + }; + } { type x = X; } else { move || { trait x { } union B { x: () } }; } + } + } +} + +fn main() {} |
