Skip to content

Commit 26e4cf0

Browse files
authored
Rollup merge of #79795 - matklad:unicode-private, r=cramertj
Privatize some of libcore unicode_internals My understanding is that these API are perma unstable, so it doesn't make sense to pollute docs & IDE completion[1] with them. [1]: rust-lang/rust-analyzer#6738
2 parents 2cca5e1 + 88da568 commit 26e4cf0

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

library/alloc/src/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl str {
388388
}
389389

390390
fn case_ignoreable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
391-
use core::unicode::derived_property::{Case_Ignorable, Cased};
391+
use core::unicode::{Case_Ignorable, Cased};
392392
match iter.skip_while(|&c| Case_Ignorable(c)).next() {
393393
Some(c) => Cased(c),
394394
None => false,

library/core/src/unicode/mod.rs

+10-13
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,14 @@ mod unicode_data;
1818
pub const UNICODE_VERSION: (u8, u8, u8) = unicode_data::UNICODE_VERSION;
1919

2020
// For use in liballoc, not re-exported in libstd.
21-
pub mod derived_property {
22-
pub use super::{Case_Ignorable, Cased};
23-
}
21+
pub use unicode_data::{
22+
case_ignorable::lookup as Case_Ignorable, cased::lookup as Cased, conversions,
23+
};
2424

25-
pub use unicode_data::alphabetic::lookup as Alphabetic;
26-
pub use unicode_data::case_ignorable::lookup as Case_Ignorable;
27-
pub use unicode_data::cased::lookup as Cased;
28-
pub use unicode_data::cc::lookup as Cc;
29-
pub use unicode_data::conversions;
30-
pub use unicode_data::grapheme_extend::lookup as Grapheme_Extend;
31-
pub use unicode_data::lowercase::lookup as Lowercase;
32-
pub use unicode_data::n::lookup as N;
33-
pub use unicode_data::uppercase::lookup as Uppercase;
34-
pub use unicode_data::white_space::lookup as White_Space;
25+
pub(crate) use unicode_data::alphabetic::lookup as Alphabetic;
26+
pub(crate) use unicode_data::cc::lookup as Cc;
27+
pub(crate) use unicode_data::grapheme_extend::lookup as Grapheme_Extend;
28+
pub(crate) use unicode_data::lowercase::lookup as Lowercase;
29+
pub(crate) use unicode_data::n::lookup as N;
30+
pub(crate) use unicode_data::uppercase::lookup as Uppercase;
31+
pub(crate) use unicode_data::white_space::lookup as White_Space;

0 commit comments

Comments
 (0)