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.
1 parent 28a0b25 commit 4065246Copy full SHA for 4065246
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