| 1 |
#[lang = "sized"] |
| 2 |
trait Sized {} |
| 3 |
|
| 4 |
// ---- gccrs additions |
| 5 |
|
| 6 |
#[lang = "clone"] |
| 7 |
pub trait Clone: Sized { |
| 8 |
#[stable(feature = "rust1", since = "1.0.0")] |
| 9 |
#[must_use = "cloning is often expensive and is not expected to have side effects"] |
| 10 |
fn clone(&self) -> Self; |
| 11 |
|
| 12 |
#[inline] |
| 13 |
#[stable(feature = "rust1", since = "1.0.0")] |
| 14 |
fn clone_from(&mut self, source: &Self) { |
| 15 |
*self = source.clone() |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
#[unstable(feature = "never_type", issue = "35121")] |
| 20 |
impl Clone for ! { |
| 21 |
#[inline] |
| 22 |
fn clone(&self) -> Self { |
| 23 |
*self |
| 24 |
} |
| 25 |
} |