about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-09-29 11:56:43 +1000
committerGitHub <noreply@github.com>2025-09-29 11:56:43 +1000
commitf74aa5aa6ff693ea782cc5c8e7f2d8f6bf1f7029 (patch)
tree5894fbcf2393998735af1aef5465b3667eabbfba
parent01b172ef33ff2aaaa11ed36cfed7cceedc214423 (diff)
parent0d658fe156c077e0f37068d5788f6c375d555b54 (diff)
downloadrust-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.rs30
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() {}