]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/unicode.fixed
Rollup merge of #98429 - b-naber:use-correct-substs-discriminant-cast, r=lcnr
[rust.git] / src / tools / clippy / tests / ui / unicode.fixed
1 // run-rustfix
2 #[warn(clippy::invisible_characters)]
3 fn zero() {
4     print!("Here >\u{200B}< is a ZWS, and \u{200B}another");
5     print!("This\u{200B}is\u{200B}fine");
6     print!("Here >\u{AD}< is a SHY, and \u{AD}another");
7     print!("This\u{ad}is\u{ad}fine");
8     print!("Here >\u{2060}< is a WJ, and \u{2060}another");
9     print!("This\u{2060}is\u{2060}fine");
10 }
11
12 #[warn(clippy::unicode_not_nfc)]
13 fn canon() {
14     print!("̀àh?");
15     print!("a\u{0300}h?"); // also ok
16 }
17
18 #[warn(clippy::non_ascii_literal)]
19 fn uni() {
20     print!("\u{dc}ben!");
21     print!("\u{DC}ben!"); // this is ok
22 }
23
24 // issue 8013
25 #[warn(clippy::non_ascii_literal)]
26 fn single_quote() {
27     const _EMPTY_BLOCK: char = '\u{25b1}';
28     const _FULL_BLOCK: char = '\u{25b0}';
29 }
30
31 fn main() {
32     zero();
33     uni();
34     canon();
35     single_quote();
36 }