summary refs log tree commit diff
path: root/src/test/ui/union/union-generic.rs
blob: 4b2ccbdb7b402207f62a68b7c64ac672d810fae2 (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 `std::rc::Rc<u32>: std::marker::Copy` is not satisfied
    let u = U::<Rc<u32>> { a: Default::default() };
    //~^ ERROR  the trait bound `std::rc::Rc<u32>: std::marker::Copy` is not satisfied
}