Skip to content

Commit 415f3de

Browse files
committed
Stabilize std::char::{encode_utf8, encode_utf16}
1 parent b02ed1e commit 415f3de

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/libcore/char.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,9 @@ pub trait CharExt {
327327
fn len_utf8(self) -> usize;
328328
#[stable(feature = "core", since = "1.6.0")]
329329
fn len_utf16(self) -> usize;
330-
#[unstable(feature = "unicode", issue = "27784")]
330+
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
331331
fn encode_utf8(self, dst: &mut [u8]) -> &mut str;
332-
#[unstable(feature = "unicode", issue = "27784")]
332+
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
333333
fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16];
334334
}
335335

src/libstd_unicode/char.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,6 @@ impl char {
448448
/// In both of these examples, 'ß' takes two bytes to encode.
449449
///
450450
/// ```
451-
/// #![feature(unicode)]
452-
///
453451
/// let mut b = [0; 2];
454452
///
455453
/// let result = 'ß'.encode_utf8(&mut b);
@@ -474,9 +472,7 @@ impl char {
474472
///
475473
/// assert!(result.is_err());
476474
/// ```
477-
#[unstable(feature = "unicode",
478-
reason = "pending decision about Iterator/Writer/Reader",
479-
issue = "27784")]
475+
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
480476
#[inline]
481477
pub fn encode_utf8(self, dst: &mut [u8]) -> &mut str {
482478
C::encode_utf8(self, dst)
@@ -495,8 +491,6 @@ impl char {
495491
/// In both of these examples, '𝕊' takes two `u16`s to encode.
496492
///
497493
/// ```
498-
/// #![feature(unicode)]
499-
///
500494
/// let mut b = [0; 2];
501495
///
502496
/// let result = '𝕊'.encode_utf16(&mut b);
@@ -519,9 +513,7 @@ impl char {
519513
///
520514
/// assert!(result.is_err());
521515
/// ```
522-
#[unstable(feature = "unicode",
523-
reason = "pending decision about Iterator/Writer/Reader",
524-
issue = "27784")]
516+
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
525517
#[inline]
526518
pub fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] {
527519
C::encode_utf16(self, dst)

0 commit comments

Comments
 (0)