Rollup merge of #144691 - xizheyin:suggest-confuse, r=estebank

Extend `is_case_difference` to handle digit-letter confusables

This PR extends `is_case_difference` to handle digit-letter confusables

Add support for detecting 0/O, 1/l, 5/S, 8/B, 9/g confusables in error suggestions.

r? `@estebank`
This commit is contained in:
Jacob Pratt 2025-08-01 00:38:20 -04:00 committed by GitHub
commit 1b39c3590c

View file

@ -18,7 +18,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` (notice the capitalization difference)
help: consider changing the case of this arm to respect `to_ascii_lowercase` (notice the capitalization)
|
LL - "~!@#$%^&*()-_=+Foo" => {},
LL + "~!@#$%^&*()-_=+foo" => {},