]> git.lizzy.rs Git - rust.git/blob - tests/ui/unicode.rs
Merge pull request #3085 from mikerite/revert-98dbce
[rust.git] / tests / ui / unicode.rs
1 #![feature(tool_lints)]
2
3
4 #[warn(clippy::zero_width_space)]
5 fn zero() {
6     print!("Here >​< is a ZWS, and ​another");
7     print!("This\u{200B}is\u{200B}fine");
8 }
9
10 #[warn(clippy::unicode_not_nfc)]
11 fn canon() {
12     print!("̀àh?");
13     print!("a\u{0300}h?"); // also okay
14 }
15
16 #[warn(clippy::non_ascii_literal)]
17 fn uni() {
18     print!("Üben!");
19     print!("\u{DC}ben!"); // this is okay
20 }
21
22 fn main() {
23     zero();
24     uni();
25     canon();
26 }