mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 17:13:48 +00:00
cb0132d209
Fix `match_str_case_mismatch` on uncased chars False positives would result because `char::is_lowercase` and friends will return `false` for non-alphabetic chars and alphabetic chars lacking case (such as CJK scripts). Care also has to be taken for handling titlecase characters (`Dz`) and lowercased chars with no uppercase equivalent (`ʁ`). For example, when verifying lowercase: * Check `!any(char::is_ascii_uppercase)` instead of `all(char::is_ascii_lowercase)` for ASCII. * Check that `all(|c| c.to_lowercase() == c)` instead of `all(char::is_lowercase)` for non-ASCII Fixes #7863. changelog: Fix false positives in [`match_str_case_mismatch`] on uncased characters |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |