aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/derive_macro6.rs
blob: 35327c03b54c36698a68b97cf87c638d169d2fd8 (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 {}

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,
}