about summary refs log tree commit diff
path: root/tests/ui/union/union-generic.rs
blob: ff877892579b9008a9d87425b267fcf517659132 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use std::rc::Rc;

union U<T: Copy> {
    a: T
}

fn main() {
    let u = U { a: Rc::new(0u32) };
    //~^ ERROR  the trait bound `Rc<u32>: Copy` is not satisfied
    let u = U::<Rc<u32>> { a: Default::default() };
    //~^ ERROR  the trait bound `Rc<u32>: Copy` is not satisfied
}