Closed
Description
Summary
The lint produces false positives if there is an underscore _
in/after the ident, not if _ is at the beginning of the ident
Lint Name
clippy::disallowed_script_idents
Reproducer
I tried this code:
#![warn(clippy::disallowed_script_idents)]
fn main() {
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;
}
I saw this happen:
cargo clippy
warning: identifier `Ä_ÖÜ` has a Unicode script that is not allowed by configuration: Common
--> src/main.rs:7:8
|
7 | const Ä_ÖÜ: u8 = 0;
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_script_idents
I expected to see this happen:
Version
Additional Labels
No response