mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 01:42:54 +03:00
4aeb297064
This PR reverts RUST-147622 for several reasons: 1. The RUST-147622 PR would format the generated core library code using an arbitrary `rustfmt` picked up from `PATH`, which will cause hard-to-debug failures when the `rustfmt` used to format the generated unicode data code versus the `rustfmt` used to format the in-tree library code. 2. Previously, the `unicode-table-generator` tests were not run under CI as part of `coretests`, and since for `x86_64-gnu-aux` job we run library `coretests` with `miri`, the generated tests unfortunately caused an unacceptably large Merge CI time regression from ~2 hours to ~3.5 hours, making it the slowest Merge CI job (and thus the new bottleneck). 3. This PR also has an unintended effect of causing a diagnostic regression (RUST-148387), though that's mostly an edge case not properly handled by `rustc` diagnostics. Given that these are three distinct causes with non-trivial fixes, I'm proposing to revert this PR to return us to baseline. This is not prejudice against relanding the changes with these issues addressed, but to alleviate time pressure to address these non-trivial issues.
35 lines
1.5 KiB
Rust
35 lines
1.5 KiB
Rust
//! Unicode internals used in liballoc and libstd. Not public API.
|
|
#![unstable(feature = "unicode_internals", issue = "none")]
|
|
#![doc(hidden)]
|
|
|
|
// for use in alloc, not re-exported in std.
|
|
#[rustfmt::skip]
|
|
pub use unicode_data::case_ignorable::lookup as Case_Ignorable;
|
|
pub use unicode_data::cased::lookup as Cased;
|
|
pub use unicode_data::conversions;
|
|
|
|
#[rustfmt::skip]
|
|
pub(crate) use unicode_data::alphabetic::lookup as Alphabetic;
|
|
pub(crate) use unicode_data::grapheme_extend::lookup as Grapheme_Extend;
|
|
pub(crate) use unicode_data::lowercase::lookup as Lowercase;
|
|
pub(crate) use unicode_data::n::lookup as N;
|
|
pub(crate) use unicode_data::uppercase::lookup as Uppercase;
|
|
pub(crate) use unicode_data::white_space::lookup as White_Space;
|
|
|
|
pub(crate) mod printable;
|
|
|
|
#[allow(unreachable_pub)]
|
|
mod unicode_data;
|
|
|
|
/// The version of [Unicode](https://www.unicode.org/) that the Unicode parts of
|
|
/// `char` and `str` methods are based on.
|
|
///
|
|
/// New versions of Unicode are released regularly and subsequently all methods
|
|
/// in the standard library depending on Unicode are updated. Therefore the
|
|
/// behavior of some `char` and `str` methods and the value of this constant
|
|
/// changes over time. This is *not* considered to be a breaking change.
|
|
///
|
|
/// The version numbering scheme is explained in
|
|
/// [Unicode 11.0 or later, Section 3.1 Versions of the Unicode Standard](https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf#page=4).
|
|
pub const UNICODE_VERSION: (u8, u8, u8) = unicode_data::UNICODE_VERSION;
|