about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2016-07-27 12:10:31 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2016-07-28 02:20:49 +0200
commit3d09b4a0d58200da84fe19cd3b0003d61e5b1791 (patch)
tree05adac2c734028d0c3cb5a21c4d24d5e84accce2 /src/libcollections
parent68efea08fa1cf800b3b76683992ec77a89323d53 (diff)
downloadrust-3d09b4a0d58200da84fe19cd3b0003d61e5b1791.tar.gz
rust-3d09b4a0d58200da84fe19cd3b0003d61e5b1791.zip
Rename `char::escape` to `char::escape_debug` and add tracking issue
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/lib.rs2
-rw-r--r--src/libcollections/str.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs
index 333219bc5e5..7fc6e54d69f 100644
--- a/src/libcollections/lib.rs
+++ b/src/libcollections/lib.rs
@@ -33,7 +33,7 @@
 #![feature(allow_internal_unstable)]
 #![feature(box_patterns)]
 #![feature(box_syntax)]
-#![feature(char_escape)]
+#![cfg_attr(not(test), feature(char_escape_debug))]
 #![feature(core_intrinsics)]
 #![feature(dropck_parametricity)]
 #![feature(fmt_internals)]
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs
index a63ea9d3ec7..4c64019de09 100644
--- a/src/libcollections/str.rs
+++ b/src/libcollections/str.rs
@@ -1697,12 +1697,12 @@ impl str {
         return s;
     }
 
-    /// Escapes each char in `s` with `char::escape`.
+    /// Escapes each char in `s` with `char::escape_debug`.
     #[unstable(feature = "str_escape",
                reason = "return type may change to be an iterator",
                issue = "27791")]
-    pub fn escape(&self) -> String {
-        self.chars().flat_map(|c| c.escape()).collect()
+    pub fn escape_debug(&self) -> String {
+        self.chars().flat_map(|c| c.escape_debug()).collect()
     }
 
     /// Escapes each char in `s` with `char::escape_default`.