rust-clippy/tests/ui/disallowed_script_idents.rs
2023-08-22 17:18:11 +02:00

16 lines
504 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#![deny(clippy::disallowed_script_idents)]
#![allow(dead_code)]
fn main() {
// OK, latin is allowed.
let counter = 10;
// OK, it's still latin.
let zähler = 10;
// Cyrillic is not allowed by default.
let счётчик = 10;
//~^ ERROR: identifier `счётчик` has a Unicode script that is not allowed by configura
// Same for japanese.
let = 10;
//~^ ERROR: identifier `カウンタ` has a Unicode script that is not allowed by configuratio
}