summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs
blob: e7da825ae36d1587a151ff69833f9f4921568930 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![deny(confusable_idents)]
#![allow(uncommon_codepoints, non_upper_case_globals)]

const : usize = 42;
const s_s: usize = 42;

fn main() {
    let s = "rust"; //~ ERROR identifier pair considered confusable
    let _s = "rust2"; //~ ERROR identifier pair considered confusable
    not_affected();
}

fn not_affected() {
    let s1 = 1;
    let sl = 'l';
}