about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authoryanglsh <yanglsh@shanghaitech.edu.cn>2025-06-24 21:18:22 +0800
committeryanglsh <yanglsh@shanghaitech.edu.cn>2025-06-27 22:16:58 +0800
commit7e406e276a1778390c06ce40a9a4929e3d371776 (patch)
treea6988ae2ec150b80659de148389d1e879c33e00c /tests
parentc5dbd1de07e0407b9687619a868384d6de06253f (diff)
downloadrust-7e406e276a1778390c06ce40a9a4929e3d371776.tar.gz
rust-7e406e276a1778390c06ce40a9a4929e3d371776.zip
fix: `disallowed_script_idents` FP on identifiers with `_`
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/disallowed_script_idents.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/disallowed_script_idents.rs b/tests/ui/disallowed_script_idents.rs
index 08fd1d9669e..dae380045ae 100644
--- a/tests/ui/disallowed_script_idents.rs
+++ b/tests/ui/disallowed_script_idents.rs
@@ -15,3 +15,17 @@ fn main() {
     let カウンタ = 10;
     //~^ disallowed_script_idents
 }
+
+fn issue15116() {
+    const ÄÖÜ: u8 = 0;
+    const _ÄÖÜ: u8 = 0;
+    const Ä_ÖÜ: u8 = 0;
+    const ÄÖ_Ü: u8 = 0;
+    const ÄÖÜ_: u8 = 0;
+    let äöüß = 1;
+    let _äöüß = 1;
+    let ä_öüß = 1;
+    let äö_üß = 1;
+    let äöü_ß = 1;
+    let äöüß_ = 1;
+}