rust/tests/ui/match_str_case_mismatch.stderr

54 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-10-11 20:19:34 -04:00
error: this `match` expression alters case, but has non-compliant arms
--> $DIR/match_str_case_mismatch.rs:66:5
|
LL | / match var.to_ascii_lowercase().as_str() {
LL | | "foo" => {},
LL | | "Bar" => {},
LL | | _ => {},
LL | | }
| |_____^
|
= note: `-D clippy::match-str-case-mismatch` implied by `-D warnings`
help: consider changing the case of this arm to respect `to_ascii_lowercase`
--> $DIR/match_str_case_mismatch.rs:68:9
|
LL | "Bar" => {},
| ^^^^^
error: this `match` expression alters case, but has non-compliant arms
--> $DIR/match_str_case_mismatch.rs:76:5
|
LL | / match &*var.to_ascii_lowercase() {
LL | | "foo" => {},
LL | | "Bar" => {},
LL | | _ => {},
LL | | }
| |_____^
|
help: consider changing the case of this arm to respect `to_ascii_lowercase`
--> $DIR/match_str_case_mismatch.rs:78:9
|
LL | "Bar" => {},
| ^^^^^
error: this `match` expression alters case, but has non-compliant arms
--> $DIR/match_str_case_mismatch.rs:86:5
|
LL | / match &*var
LL | | .to_ascii_lowercase()
LL | | .to_uppercase()
LL | | .to_lowercase()
... |
LL | | _ => {},
LL | | }
| |_____^
|
help: consider changing the case of this arm to respect `to_ascii_uppercase`
--> $DIR/match_str_case_mismatch.rs:93:9
|
LL | "bAR" => {},
| ^^^^^
error: aborting due to 3 previous errors