Skip to content

Commit

Permalink
Rollup merge of rust-lang#39836 - durka:patch-37, r=alexcrichton
Browse files Browse the repository at this point in the history
fix types in to_owned doctest

Fixes rust-lang#39831.
  • Loading branch information
frewsxcv authored Feb 16, 2017
2 parents 4a07be3 + e3384e0 commit 46564d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcollections/borrow.rs
Original file line number Diff line number Diff line change
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 46564d4

Please sign in to comment.