We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3b13b9c + 4065246 commit 19cd000Copy full SHA for 19cd000
src/libcore/clone.rs
@@ -27,6 +27,14 @@ use marker::Sized;
27
#[stable(feature = "rust1", since = "1.0.0")]
28
pub trait Clone : Sized {
29
/// Returns a copy of the value.
30
+ ///
31
+ /// # Examples
32
33
+ /// ```
34
+ /// let hello = "Hello"; // &str implements Clone
35
36
+ /// assert_eq!("Hello", hello.clone());
37
38
39
fn clone(&self) -> Self;
40
0 commit comments