diff options
| author | Pyfisch <pyfisch@posteo.org> | 2020-04-12 19:18:03 +0200 |
|---|---|---|
| committer | Pyfisch <pyfisch@posteo.org> | 2020-04-23 14:36:30 +0200 |
| commit | aa0175c98d0530b32a80542aaf9dab1be03dbb2b (patch) | |
| tree | ff77eb80cf00c0069191a8def422854a973f2058 | |
| parent | 4d1fbaccb822b6d52dc786589de7918d3c5effb1 (diff) | |
| download | rust-aa0175c98d0530b32a80542aaf9dab1be03dbb2b.tar.gz rust-aa0175c98d0530b32a80542aaf9dab1be03dbb2b.zip | |
Stabilize UNICODE_VERSION (feature unicode_version)
The feature will become stable in Rust 1.45. Noted that the value of UNICODE_VERSION is expected to change.
| -rw-r--r-- | src/libcore/char/mod.rs | 4 | ||||
| -rw-r--r-- | src/libcore/unicode/mod.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/char_unicode.rs | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/libcore/char/mod.rs b/src/libcore/char/mod.rs index 715ad8992ad..d82a482e0f1 100644 --- a/src/libcore/char/mod.rs +++ b/src/libcore/char/mod.rs @@ -34,9 +34,7 @@ pub use self::convert::ParseCharError; pub use self::convert::{from_digit, from_u32}; #[stable(feature = "decode_utf16", since = "1.9.0")] pub use self::decode::{decode_utf16, DecodeUtf16, DecodeUtf16Error}; - -// unstable re-exports -#[unstable(feature = "unicode_version", issue = "49726")] +#[stable(feature = "unicode_version", since = "1.45.0")] pub use crate::unicode::UNICODE_VERSION; use crate::fmt::{self, Write}; diff --git a/src/libcore/unicode/mod.rs b/src/libcore/unicode/mod.rs index 3952ae4482e..28c07f77170 100644 --- a/src/libcore/unicode/mod.rs +++ b/src/libcore/unicode/mod.rs @@ -7,9 +7,14 @@ mod unicode_data; /// The version of [Unicode](http://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). -#[unstable(feature = "unicode_version", issue = "49726")] +#[stable(feature = "unicode_version", since = "1.45.0")] pub const UNICODE_VERSION: (u8, u8, u8) = unicode_data::UNICODE_VERSION; // For use in liballoc, not re-exported in libstd. diff --git a/src/test/ui/char_unicode.rs b/src/test/ui/char_unicode.rs index 8d28f0080dd..65dda47066f 100644 --- a/src/test/ui/char_unicode.rs +++ b/src/test/ui/char_unicode.rs @@ -1,8 +1,6 @@ // run-pass -#![feature(unicode_version)] - -/// Tests access to the internal Unicode Version type and value. +/// Tests access to the Unicode version constant. pub fn main() { check(std::char::UNICODE_VERSION); } |
