Skip to content

Commit efcda04

Browse files
Replace old tables with new unicode data
1 parent 40ad877 commit efcda04

File tree

6 files changed

+2353
-3189
lines changed

6 files changed

+2353
-3189
lines changed

src/libcore/char/methods.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use crate::slice;
44
use crate::str::from_utf8_unchecked_mut;
55
use crate::unicode::printable::is_printable;
6-
use crate::unicode::tables::{conversions, derived_property, general_category, property};
6+
use crate::unicode::{self, conversions};
77

88
use super::*;
99

@@ -552,7 +552,7 @@ impl char {
552552
pub fn is_alphabetic(self) -> bool {
553553
match self {
554554
'a'..='z' | 'A'..='Z' => true,
555-
c => c > '\x7f' && derived_property::Alphabetic(c),
555+
c => c > '\x7f' && unicode::Alphabetic(c),
556556
}
557557
}
558558

@@ -583,7 +583,7 @@ impl char {
583583
pub fn is_lowercase(self) -> bool {
584584
match self {
585585
'a'..='z' => true,
586-
c => c > '\x7f' && derived_property::Lowercase(c),
586+
c => c > '\x7f' && unicode::Lowercase(c),
587587
}
588588
}
589589

@@ -614,7 +614,7 @@ impl char {
614614
pub fn is_uppercase(self) -> bool {
615615
match self {
616616
'A'..='Z' => true,
617-
c => c > '\x7f' && derived_property::Uppercase(c),
617+
c => c > '\x7f' && unicode::Uppercase(c),
618618
}
619619
}
620620

@@ -642,7 +642,7 @@ impl char {
642642
pub fn is_whitespace(self) -> bool {
643643
match self {
644644
' ' | '\x09'..='\x0d' => true,
645-
c => c > '\x7f' && property::White_Space(c),
645+
c => c > '\x7f' && unicode::White_Space(c),
646646
}
647647
}
648648

@@ -693,7 +693,7 @@ impl char {
693693
#[stable(feature = "rust1", since = "1.0.0")]
694694
#[inline]
695695
pub fn is_control(self) -> bool {
696-
general_category::Cc(self)
696+
unicode::Cc(self)
697697
}
698698

699699
/// Returns `true` if this `char` has the `Grapheme_Extend` property.
@@ -707,7 +707,7 @@ impl char {
707707
/// [`DerivedCoreProperties.txt`]: https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt
708708
#[inline]
709709
pub(crate) fn is_grapheme_extended(self) -> bool {
710-
derived_property::Grapheme_Extend(self)
710+
unicode::Grapheme_Extend(self)
711711
}
712712

713713
/// Returns `true` if this `char` has one of the general categories for numbers.
@@ -739,7 +739,7 @@ impl char {
739739
pub fn is_numeric(self) -> bool {
740740
match self {
741741
'0'..='9' => true,
742-
c => c > '\x7f' && general_category::N(c),
742+
c => c > '\x7f' && unicode::N(c),
743743
}
744744
}
745745

src/libcore/char/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ pub use self::decode::{decode_utf16, DecodeUtf16, DecodeUtf16Error};
3737

3838
// unstable re-exports
3939
#[unstable(feature = "unicode_version", issue = "49726")]
40-
pub use crate::unicode::tables::UNICODE_VERSION;
41-
#[unstable(feature = "unicode_version", issue = "49726")]
4240
pub use crate::unicode::version::UnicodeVersion;
41+
#[unstable(feature = "unicode_version", issue = "49726")]
42+
pub use crate::unicode::UNICODE_VERSION;
4343

4444
use crate::fmt::{self, Write};
4545
use crate::iter::FusedIterator;

src/libcore/unicode/bool_trie.rs

-66
This file was deleted.

0 commit comments

Comments
 (0)