Skip to content

Commit

Permalink
Stabilize std::char::{encode_utf8, encode_utf16}
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon committed Dec 15, 2016
1 parent b02ed1e commit 415f3de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/libcore/char.rs
Expand Up @@ -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];
}

Expand Down
12 changes: 2 additions & 10 deletions src/libstd_unicode/char.rs
Expand Up @@ -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);
Expand All @@ -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)
Expand All @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 415f3de

Please sign in to comment.