Skip to content

Commit

Permalink
Rollup merge of rust-lang#121107 - estebank:capitalization-suggestion…
Browse files Browse the repository at this point in the history
…, r=michaelwoerister

Fix msg for verbose suggestions with confusable capitalization

When encountering a verbose/multipart suggestion that has changes that are only caused by different capitalization of ASCII letters that have little differenciation, expand the message to highlight that fact (like we already do for inline suggestions).

The logic to do this was already present, but implemented incorrectly.
  • Loading branch information
GuillaumeGomez authored Feb 15, 2024
2 parents b3b9f31 + ad7914f commit eff8793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ui/match_str_case_mismatch.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ error: this `match` arm has a differing case than its expression
LL | "~!@#$%^&*()-_=+Foo" => {},
| ^^^^^^^^^^^^^^^^^^^^
|
help: consider changing the case of this arm to respect `to_ascii_lowercase`
help: consider changing the case of this arm to respect `to_ascii_lowercase` (notice the capitalization difference)
|
LL | "~!@#$%^&*()-_=+foo" => {},
| ~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit eff8793

Please sign in to comment.