Skip to content

Commit 1206c80

Browse files
committed
std: Stabilize char_escape_debug
Stabilizes: * `<char>::escape_debug` * `std::char::EscapeDebug` Closes rust-lang#35068
1 parent 086f9e4 commit 1206c80

File tree

6 files changed

+6
-13
lines changed

6 files changed

+6
-13
lines changed

Diff for: src/liballoc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979

8080
#![cfg_attr(test, allow(deprecated))] // rand
8181
#![cfg_attr(test, feature(placement_in))]
82-
#![cfg_attr(not(test), feature(char_escape_debug))]
8382
#![cfg_attr(not(test), feature(core_float))]
8483
#![cfg_attr(not(test), feature(exact_size_is_empty))]
8584
#![cfg_attr(not(test), feature(slice_rotate))]

Diff for: src/libcore/char.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ pub trait CharExt {
379379
fn escape_unicode(self) -> EscapeUnicode;
380380
#[stable(feature = "core", since = "1.6.0")]
381381
fn escape_default(self) -> EscapeDefault;
382-
#[unstable(feature = "char_escape_debug", issue = "35068")]
382+
#[stable(feature = "char_escape_debug", since = "1.20.0")]
383383
fn escape_debug(self) -> EscapeDebug;
384384
#[stable(feature = "core", since = "1.6.0")]
385385
fn len_utf8(self) -> usize;
@@ -776,24 +776,24 @@ impl fmt::Display for EscapeDefault {
776776
///
777777
/// [`escape_debug`]: ../../std/primitive.char.html#method.escape_debug
778778
/// [`char`]: ../../std/primitive.char.html
779-
#[unstable(feature = "char_escape_debug", issue = "35068")]
779+
#[stable(feature = "char_escape_debug", since = "1.20.0")]
780780
#[derive(Clone, Debug)]
781781
pub struct EscapeDebug(EscapeDefault);
782782

783-
#[unstable(feature = "char_escape_debug", issue = "35068")]
783+
#[stable(feature = "char_escape_debug", since = "1.20.0")]
784784
impl Iterator for EscapeDebug {
785785
type Item = char;
786786
fn next(&mut self) -> Option<char> { self.0.next() }
787787
fn size_hint(&self) -> (usize, Option<usize>) { self.0.size_hint() }
788788
}
789789

790-
#[unstable(feature = "char_escape_debug", issue = "35068")]
790+
#[stable(feature = "char_escape_debug", since = "1.20.0")]
791791
impl ExactSizeIterator for EscapeDebug { }
792792

793793
#[unstable(feature = "fused", issue = "35602")]
794794
impl FusedIterator for EscapeDebug {}
795795

796-
#[unstable(feature = "char_escape_debug", issue = "35068")]
796+
#[stable(feature = "char_escape_debug", since = "1.20.0")]
797797
impl fmt::Display for EscapeDebug {
798798
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
799799
fmt::Display::fmt(&self.0, f)

Diff for: src/libcore/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![deny(warnings)]
1212

1313
#![feature(box_syntax)]
14-
#![feature(char_escape_debug)]
1514
#![feature(const_fn)]
1615
#![feature(core_float)]
1716
#![feature(core_private_bignum)]

Diff for: src/libstd/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@
249249
#![feature(cfg_target_has_atomic)]
250250
#![feature(cfg_target_thread_local)]
251251
#![feature(cfg_target_vendor)]
252-
#![feature(char_escape_debug)]
253252
#![feature(char_error_internals)]
254253
#![feature(char_internals)]
255254
#![feature(collections_range)]

Diff for: src/libstd_unicode/char.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ impl char {
326326
/// As an iterator:
327327
///
328328
/// ```
329-
/// # #![feature(char_escape_debug)]
330329
/// for c in '\n'.escape_debug() {
331330
/// print!("{}", c);
332331
/// }
@@ -336,7 +335,6 @@ impl char {
336335
/// Using `println!` directly:
337336
///
338337
/// ```
339-
/// # #![feature(char_escape_debug)]
340338
/// println!("{}", '\n'.escape_debug());
341339
/// ```
342340
///
@@ -349,10 +347,9 @@ impl char {
349347
/// Using `to_string`:
350348
///
351349
/// ```
352-
/// # #![feature(char_escape_debug)]
353350
/// assert_eq!('\n'.escape_debug().to_string(), "\\n");
354351
/// ```
355-
#[unstable(feature = "char_escape_debug", issue = "35068")]
352+
#[stable(feature = "char_escape_debug", since = "1.20.0")]
356353
#[inline]
357354
pub fn escape_debug(self) -> EscapeDebug {
358355
C::escape_debug(self)

Diff for: src/libstd_unicode/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#![deny(warnings)]
3333
#![no_std]
3434

35-
#![feature(char_escape_debug)]
3635
#![feature(core_char_ext)]
3736
#![feature(str_internals)]
3837
#![feature(core_intrinsics)]

0 commit comments

Comments
 (0)