Skip to content

Commit 6eb0378

Browse files
authored
Rollup merge of rust-lang#145414 - Kmeakin:km/unicode-table-refactors, r=joshtriplett,tgross35
unicode-table-generator refactors Split off from rust-lang#145219
2 parents 48ad0a3 + b445e92 commit 6eb0378

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

core/src/unicode/unicode_data.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
///! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually!
2+
// Alphabetic : 1727 bytes, 142759 codepoints in 757 ranges (U+000041 - U+0323B0) using skiplist
3+
// Case_Ignorable : 1053 bytes, 2749 codepoints in 452 ranges (U+000027 - U+0E01F0) using skiplist
4+
// Cased : 407 bytes, 4578 codepoints in 159 ranges (U+000041 - U+01F18A) using skiplist
5+
// Cc : 9 bytes, 65 codepoints in 2 ranges (U+000000 - U+0000A0) using skiplist
6+
// Grapheme_Extend : 887 bytes, 2193 codepoints in 375 ranges (U+000300 - U+0E01F0) using skiplist
7+
// Lowercase : 935 bytes, 2569 codepoints in 675 ranges (U+000061 - U+01E944) using bitset
8+
// N : 457 bytes, 1911 codepoints in 144 ranges (U+000030 - U+01FBFA) using skiplist
9+
// Uppercase : 799 bytes, 1978 codepoints in 656 ranges (U+000041 - U+01F18A) using bitset
10+
// White_Space : 256 bytes, 25 codepoints in 10 ranges (U+000009 - U+003001) using cascading
11+
// to_lower : 11484 bytes
12+
// to_upper : 13432 bytes
13+
// Total : 31446 bytes
214

315
#[inline(always)]
416
const fn bitset_search<
@@ -747,7 +759,7 @@ pub mod conversions {
747759
}
748760
}
749761

750-
static LOWERCASE_TABLE: &[(char, u32)] = &[
762+
static LOWERCASE_TABLE: &[(char, u32); 1434] = &[
751763
('\u{c0}', 224), ('\u{c1}', 225), ('\u{c2}', 226), ('\u{c3}', 227), ('\u{c4}', 228),
752764
('\u{c5}', 229), ('\u{c6}', 230), ('\u{c7}', 231), ('\u{c8}', 232), ('\u{c9}', 233),
753765
('\u{ca}', 234), ('\u{cb}', 235), ('\u{cc}', 236), ('\u{cd}', 237), ('\u{ce}', 238),
@@ -1097,11 +1109,11 @@ pub mod conversions {
10971109
('\u{1e921}', 125251),
10981110
];
10991111

1100-
static LOWERCASE_TABLE_MULTI: &[[char; 3]] = &[
1112+
static LOWERCASE_TABLE_MULTI: &[[char; 3]; 1] = &[
11011113
['i', '\u{307}', '\u{0}'],
11021114
];
11031115

1104-
static UPPERCASE_TABLE: &[(char, u32)] = &[
1116+
static UPPERCASE_TABLE: &[(char, u32); 1526] = &[
11051117
('\u{b5}', 924), ('\u{df}', 4194304), ('\u{e0}', 192), ('\u{e1}', 193), ('\u{e2}', 194),
11061118
('\u{e3}', 195), ('\u{e4}', 196), ('\u{e5}', 197), ('\u{e6}', 198), ('\u{e7}', 199),
11071119
('\u{e8}', 200), ('\u{e9}', 201), ('\u{ea}', 202), ('\u{eb}', 203), ('\u{ec}', 204),
@@ -1474,7 +1486,7 @@ pub mod conversions {
14741486
('\u{1e941}', 125215), ('\u{1e942}', 125216), ('\u{1e943}', 125217),
14751487
];
14761488

1477-
static UPPERCASE_TABLE_MULTI: &[[char; 3]] = &[
1489+
static UPPERCASE_TABLE_MULTI: &[[char; 3]; 102] = &[
14781490
['S', 'S', '\u{0}'], ['\u{2bc}', 'N', '\u{0}'], ['J', '\u{30c}', '\u{0}'],
14791491
['\u{399}', '\u{308}', '\u{301}'], ['\u{3a5}', '\u{308}', '\u{301}'],
14801492
['\u{535}', '\u{552}', '\u{0}'], ['H', '\u{331}', '\u{0}'], ['T', '\u{308}', '\u{0}'],

0 commit comments

Comments
 (0)