rollup merge of #23671: steveklabnik/doc_std_clone
This commit is contained in:
commit
19cd00094c
@ -27,6 +27,14 @@ use marker::Sized;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait Clone : Sized {
|
||||
/// Returns a copy of the value.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// let hello = "Hello"; // &str implements Clone
|
||||
///
|
||||
/// assert_eq!("Hello", hello.clone());
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn clone(&self) -> Self;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user