summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/match_str_case_mismatch.txt
blob: 19e74c2084eae933025b46ed4bf441880b318b6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
### What it does
Checks for `match` expressions modifying the case of a string with non-compliant arms

### Why is this bad?
The arm is unreachable, which is likely a mistake

### Example
```
match &*text.to_ascii_lowercase() {
    "foo" => {},
    "Bar" => {},
    _ => {},
}
```
Use instead:
```
match &*text.to_ascii_lowercase() {
    "foo" => {},
    "bar" => {},
    _ => {},
}
```