about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcollections/string.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index 7563bb76b52..c328a58f077 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -495,8 +495,7 @@ impl String {
     ///
     /// ```
     /// let s = String::from("hello");
-    /// let b: &[_] = &[104, 101, 108, 108, 111];
-    /// assert_eq!(s.as_bytes(), b);
+    /// assert_eq!(s.as_bytes(), [104, 101, 108, 108, 111]);
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]