]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-generic.rs
Don't access pointer element type for nontemporal store
[rust.git] / src / test / ui / union / union-generic.rs
1 use std::rc::Rc;
2
3 union U<T: Copy> {
4     a: T
5 }
6
7 fn main() {
8     let u = U { a: Rc::new(0u32) };
9     //~^ ERROR  the trait bound `Rc<u32>: Copy` is not satisfied
10     let u = U::<Rc<u32>> { a: Default::default() };
11     //~^ ERROR  the trait bound `Rc<u32>: Copy` is not satisfied
12 }