about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-25 21:34:11 +0000
committerbors <bors@rust-lang.org>2021-10-25 21:34:11 +0000
commitcb0132d2090ec77f5a29c0551b07ac698a0a9eac (patch)
treede7b93ee4f78e5e43d5cd499e57416e3fb9a474e /tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff
parent3ef1f19d60dcad6bc82955ad10d8cdf0351c9800 (diff)
parente953dff5360ad718511dff79ca7c3ae5cb8118d4 (diff)
downloadrust-cb0132d2090ec77f5a29c0551b07ac698a0a9eac.tar.gz
rust-cb0132d2090ec77f5a29c0551b07ac698a0a9eac.zip
Auto merge of #7865 - Herschel:fix-match-str-case-mismatch, r=xFrednet
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
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions