aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/derive_clone_enum3.rs
blob: 92fd6eeeb2b2e527341b3f9e4494e936c0429946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[lang = "clone"]
trait Clone {
    pub fn clone(&self) -> Self;
}

impl Clone for i32 {
    fn clone(&self) -> Self {
        *self
    }
}

#[derive(Clone)]
enum StructEnum {
    A { i0: i32 },
    B { i0: i32, i1: i32, i2: i32 }
}