blob: 3d68ecb87d8d673d1c93dfb2409e915e808c7e0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// revisions: mirunsafeck thirunsafeck
// [thirunsafeck]compile-flags: -Z thir-unsafeck
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
}
|