]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/unicode.rs
Rollup merge of #78769 - est31:remove_lifetimes, r=KodrAus
[rust.git] / src / tools / clippy / tests / ui / unicode.rs
1 #[warn(clippy::invisible_characters)]
2 fn zero() {
3     print!("Here >​< is a ZWS, and ​another");
4     print!("This\u{200B}is\u{200B}fine");
5     print!("Here >­< is a SHY, and ­another");
6     print!("This\u{ad}is\u{ad}fine");
7     print!("Here >⁠< is a WJ, and ⁠another");
8     print!("This\u{2060}is\u{2060}fine");
9 }
10
11 #[warn(clippy::unicode_not_nfc)]
12 fn canon() {
13     print!("̀àh?");
14     print!("a\u{0300}h?"); // also ok
15 }
16
17 #[warn(clippy::non_ascii_literal)]
18 fn uni() {
19     print!("Üben!");
20     print!("\u{DC}ben!"); // this is ok
21 }
22
23 fn main() {
24     zero();
25     uni();
26     canon();
27 }