]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_str_case_mismatch.stderr
Add match_str_case_mismatch lint
[rust.git] / tests / ui / match_str_case_mismatch.stderr
1 error: this `match` expression alters case, but has non-compliant arms
2   --> $DIR/match_str_case_mismatch.rs:66:5
3    |
4 LL | /     match var.to_ascii_lowercase().as_str() {
5 LL | |         "foo" => {},
6 LL | |         "Bar" => {},
7 LL | |         _ => {},
8 LL | |     }
9    | |_____^
10    |
11    = note: `-D clippy::match-str-case-mismatch` implied by `-D warnings`
12 help: consider changing the case of this arm to respect `to_ascii_lowercase`
13   --> $DIR/match_str_case_mismatch.rs:68:9
14    |
15 LL |         "Bar" => {},
16    |         ^^^^^
17
18 error: this `match` expression alters case, but has non-compliant arms
19   --> $DIR/match_str_case_mismatch.rs:76:5
20    |
21 LL | /     match &*var.to_ascii_lowercase() {
22 LL | |         "foo" => {},
23 LL | |         "Bar" => {},
24 LL | |         _ => {},
25 LL | |     }
26    | |_____^
27    |
28 help: consider changing the case of this arm to respect `to_ascii_lowercase`
29   --> $DIR/match_str_case_mismatch.rs:78:9
30    |
31 LL |         "Bar" => {},
32    |         ^^^^^
33
34 error: this `match` expression alters case, but has non-compliant arms
35   --> $DIR/match_str_case_mismatch.rs:86:5
36    |
37 LL | /     match &*var
38 LL | |         .to_ascii_lowercase()
39 LL | |         .to_uppercase()
40 LL | |         .to_lowercase()
41 ...  |
42 LL | |         _ => {},
43 LL | |     }
44    | |_____^
45    |
46 help: consider changing the case of this arm to respect `to_ascii_uppercase`
47   --> $DIR/match_str_case_mismatch.rs:93:9
48    |
49 LL |         "bAR" => {},
50    |         ^^^^^
51
52 error: aborting due to 3 previous errors
53