rust/tests/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
365 B
Rust
Raw Normal View History

2020-04-25 09:38:31 +08:00
#![deny(confusable_idents)]
#![allow(uncommon_codepoints, non_upper_case_globals)]
const : usize = 42;
const s_s: usize = 42;
2020-04-25 09:38:31 +08:00
fn main() {
let s = "rust"; //~ ERROR identifier pair considered confusable
let _ = "rust2"; //~ ERROR identifier pair considered confusable
not_affected();
}
fn not_affected() {
let s1 = 1;
let sl = 'l';
2020-04-25 09:38:31 +08:00
}