Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clippy_lints/src/disallowed_script_idents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ impl EarlyLintPass for DisallowedScriptIdents {
// Fast path for ascii-only idents.
if !symbol_str.is_ascii()
&& let Some(script) = symbol_str.chars().find_map(|c| {
if c.is_ascii() {
return None;
}

c.script_extension()
.iter()
.find(|script| !self.whitelist.contains(script))
Expand Down
14 changes: 14 additions & 0 deletions tests/ui/disallowed_script_idents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}