about summary refs log tree commit diff
path: root/src/libcollections/string.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcollections/string.rs')
-rw-r--r--src/libcollections/string.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index dbf214a712b..2adece30307 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -93,7 +93,7 @@ impl String {
     /// ```
     /// # #![feature(collections, core)]
     /// let s = String::from_str("hello");
-    /// assert_eq!(s.as_slice(), "hello");
+    /// assert_eq!(&s[..], "hello");
     /// ```
     #[inline]
     #[unstable(feature = "collections",