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

pub trait Copy {}
pub trait Clone {
    fn clone(&self) -> Self;
}

struct PhantomData<T>;

pub struct AssertParamIsCopy<T: Copy> {
    _field: PhantomData<T>,
}

#[derive(Clone)] // { dg-error "bounds not satisfied for U .Copy. is not satisfied" }
union U {
    i: i32,
    f: f64,
}