From 415f3de7aa565294ab79c38c78a1fab11369f32c Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Wed, 14 Dec 2016 12:34:02 -0800 Subject: [PATCH] Stabilize std::char::{encode_utf8, encode_utf16} --- src/libcore/char.rs | 4 ++-- src/libstd_unicode/char.rs | 12 ++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 7f3ac13bac1..c14ae6e0898 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -327,9 +327,9 @@ pub trait CharExt { fn len_utf8(self) -> usize; #[stable(feature = "core", since = "1.6.0")] fn len_utf16(self) -> usize; - #[unstable(feature = "unicode", issue = "27784")] + #[stable(feature = "unicode_encode_char", since = "1.15.0")] fn encode_utf8(self, dst: &mut [u8]) -> &mut str; - #[unstable(feature = "unicode", issue = "27784")] + #[stable(feature = "unicode_encode_char", since = "1.15.0")] fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16]; } diff --git a/src/libstd_unicode/char.rs b/src/libstd_unicode/char.rs index 94599216db6..b6a502e8c1a 100644 --- a/src/libstd_unicode/char.rs +++ b/src/libstd_unicode/char.rs @@ -448,8 +448,6 @@ impl char { /// In both of these examples, 'ß' takes two bytes to encode. /// /// ``` - /// #![feature(unicode)] - /// /// let mut b = [0; 2]; /// /// let result = 'ß'.encode_utf8(&mut b); @@ -474,9 +472,7 @@ impl char { /// /// assert!(result.is_err()); /// ``` - #[unstable(feature = "unicode", - reason = "pending decision about Iterator/Writer/Reader", - issue = "27784")] + #[stable(feature = "unicode_encode_char", since = "1.15.0")] #[inline] pub fn encode_utf8(self, dst: &mut [u8]) -> &mut str { C::encode_utf8(self, dst) @@ -495,8 +491,6 @@ impl char { /// In both of these examples, '𝕊' takes two `u16`s to encode. /// /// ``` - /// #![feature(unicode)] - /// /// let mut b = [0; 2]; /// /// let result = '𝕊'.encode_utf16(&mut b); @@ -519,9 +513,7 @@ impl char { /// /// assert!(result.is_err()); /// ``` - #[unstable(feature = "unicode", - reason = "pending decision about Iterator/Writer/Reader", - issue = "27784")] + #[stable(feature = "unicode_encode_char", since = "1.15.0")] #[inline] pub fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] { C::encode_utf16(self, dst)