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

13 lines
375 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(non_ascii_idents)]
const חלודה: usize = 2; //~ ERROR identifier contains non-ASCII characters
fn coöperation() {} //~ ERROR identifier contains non-ASCII characters
fn main() {
let naïveté = 2; //~ ERROR identifier contains non-ASCII characters
// using the same identifier the second time won't trigger the lint.
println!("{}", naïveté);
}