about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Burka <durka42+github@gmail.com>2017-02-14 23:07:51 -0500
committerGitHub <noreply@github.com>2017-02-14 23:07:51 -0500
commite3384e08ca9d9596c4b2658f50865c59537169b0 (patch)
tree4c510a6ee03603b109d34d09f2c0d1f6b01c85bd
parent025c328bf5ab336ff708e62a59292298dc1bc089 (diff)
fix types in to_owned doctest
-rw-r--r--src/libcollections/borrow.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcollections/borrow.rs b/src/libcollections/borrow.rs
index e5bcf0d8e81..65056121f05 100644
--- a/src/libcollections/borrow.rs
+++ b/src/libcollections/borrow.rs
@@ -52,11 +52,11 @@ pub trait ToOwned {
     /// Basic usage:
     ///
     /// ```
-    /// let s = "a"; // &str
-    /// let ss = s.to_owned(); // String
+    /// let s: &str = "a";
+    /// let ss: String = s.to_owned();
     ///
-    /// let v = &[1, 2]; // slice
-    /// let vv = v.to_owned(); // Vec
+    /// let v: &[i32] = &[1, 2];
+    /// let vv: Vec<i32> = v.to_owned();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn to_owned(&self) -> Self::Owned;