Upgrade rust/crates/regex-syntax to 0.6.20
Test: make
Change-Id: If42f1186cfdfae7f6752ca48aa7501c7626459a6
diff --git a/src/unicode.rs b/src/unicode.rs
index 7e41439..a78362b 100644
--- a/src/unicode.rs
+++ b/src/unicode.rs
@@ -237,8 +237,16 @@
fn canonical_binary(&self, name: &str) -> Result<CanonicalClassQuery> {
let norm = symbolic_name_normalize(name);
- if let Some(canon) = canonical_prop(&norm)? {
- return Ok(CanonicalClassQuery::Binary(canon));
+ // This is a special case where 'cf' refers to the 'Format' general
+ // category, but where the 'cf' abbreviation is also an abbreviation
+ // for the 'Case_Folding' property. But we want to treat it as
+ // a general category. (Currently, we don't even support the
+ // 'Case_Folding' property. But if we do in the future, users will be
+ // required to spell it out.)
+ if norm != "cf" {
+ if let Some(canon) = canonical_prop(&norm)? {
+ return Ok(CanonicalClassQuery::Binary(canon));
+ }
}
if let Some(canon) = canonical_gencat(&norm)? {
return Ok(CanonicalClassQuery::GeneralCategory(canon));