diff --git a/src/etc/unicode.py b/src/etc/unicode.py index 406f5380d469..2b0f8d971f51 100755 --- a/src/etc/unicode.py +++ b/src/etc/unicode.py @@ -330,7 +330,7 @@ fn trie_range_leaf(c: usize, bitmap_chunk: u64) -> bool { fn trie_lookup_range_table(c: char, r: &'static BoolTrie) -> bool { let c = c as usize; if c < 0x800 { - trie_range_leaf(c, r.r1[c >> 8]) + trie_range_leaf(c, r.r1[c >> 6]) } else if c < 0x10000 { let child = r.r2[c >> 6]; trie_range_leaf(c, r.r3[child as usize]) diff --git a/src/librustc_unicode/tables.rs b/src/librustc_unicode/tables.rs index a3afa3b56ec9..6c992369cd45 100644 --- a/src/librustc_unicode/tables.rs +++ b/src/librustc_unicode/tables.rs @@ -37,7 +37,7 @@ fn trie_range_leaf(c: usize, bitmap_chunk: u64) -> bool { fn trie_lookup_range_table(c: char, r: &'static BoolTrie) -> bool { let c = c as usize; if c < 0x800 { - trie_range_leaf(c, r.r1[c >> 8]) + trie_range_leaf(c, r.r1[c >> 6]) } else if c < 0x10000 { let child = r.r2[c >> 6]; trie_range_leaf(c, r.r3[child as usize])