rust/tests/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs
2023-01-11 09:32:08 +00:00

17 lines
365 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(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 _ = "rust2"; //~ ERROR identifier pair considered confusable
not_affected();
}
fn not_affected() {
let s1 = 1;
let sl = 'l';
}