aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/derive_macro6.rs
blob: 412144d5917ab3e8711fef26dad8ece2622c6028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#[lang = "sized"]
pub trait Sized {}

#[lang = "copy"]
pub trait Copy {}

#[lang = "clone"]
pub trait Clone {
    fn clone(&self) -> Self;
}

#[lang = "phantom_data"]
pub struct PhantomData<T>;

impl Copy for i32 {}
impl Copy for i64 {}
impl Copy for U {}

#[derive(Clone)]
union U {
    i: i32,
    f: f64,
}