summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/invalid_utf8_in_unchecked.txt
blob: afb5acbe9c51cf079e6498acd2bba609712a239b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
### What it does
Checks for `std::str::from_utf8_unchecked` with an invalid UTF-8 literal

### Why is this bad?
Creating such a `str` would result in undefined behavior

### Example
```
unsafe {
    std::str::from_utf8_unchecked(b"cl\x82ippy");
}
```