fix types in to_owned doctest
This commit is contained in:
parent
025c328bf5
commit
e3384e08ca
|
@ -52,11 +52,11 @@ pub trait ToOwned {
|
||||||
/// Basic usage:
|
/// Basic usage:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// let s = "a"; // &str
|
/// let s: &str = "a";
|
||||||
/// let ss = s.to_owned(); // String
|
/// let ss: String = s.to_owned();
|
||||||
///
|
///
|
||||||
/// let v = &[1, 2]; // slice
|
/// let v: &[i32] = &[1, 2];
|
||||||
/// let vv = v.to_owned(); // Vec
|
/// let vv: Vec<i32> = v.to_owned();
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
fn to_owned(&self) -> Self::Owned;
|
fn to_owned(&self) -> Self::Owned;
|
||||||
|
|
Loading…
Reference in New Issue