summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/non_ascii_literal.txt
blob: 164902b4726e1011ba6890f64383ea3103be3121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
### What it does
Checks for non-ASCII characters in string and char literals.

### Why is this bad?
Yeah, we know, the 90's called and wanted their charset
back. Even so, there still are editors and other programs out there that
don't work well with Unicode. So if the code is meant to be used
internationally, on multiple operating systems, or has other portability
requirements, activating this lint could be useful.

### Example
```
let x = String::from("€");
```

Use instead:
```
let x = String::from("\u{20ac}");
```