-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99bfee7
commit 0c99de0
Showing
2 changed files
with
45 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,36 @@ | ||
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` | ||
error: this `match` arm has a differing case than its expression | ||
--> $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 | | } | ||
| |_____^ | ||
| | ||
= note: `-D clippy::match-str-case-mismatch` implied by `-D warnings` | ||
help: consider changing the case of this arm to respect `to_ascii_lowercase` | ||
| | ||
LL | "bar" => {}, | ||
| ~~~~~ | ||
|
||
error: this `match` arm has a differing case than its expression | ||
--> $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` | ||
help: consider changing the case of this arm to respect `to_ascii_lowercase` | ||
| | ||
LL | "bar" => {}, | ||
| ~~~~~ | ||
|
||
error: this `match` arm has a differing case than its expression | ||
--> $DIR/match_str_case_mismatch.rs:93:9 | ||
| | ||
LL | "bAR" => {}, | ||
| ^^^^^ | ||
| | ||
help: consider changing the case of this arm to respect `to_ascii_uppercase` | ||
| | ||
LL | "BAR" => {}, | ||
| ~~~~~ | ||
|
||
error: aborting due to 3 previous errors | ||
|