Skip to content

Commit

Permalink
fix types in to_owned doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
durka committed Feb 15, 2017
1 parent 025c328 commit e3384e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcollections/borrow.rs
Expand Up @@ -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;
Expand Down

0 comments on commit e3384e0

Please sign in to comment.