]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-generic.rs
Rollup merge of #93385 - CraftSpider:rustdoc-ty-fixes, r=camelid
[rust.git] / src / test / ui / union / union-generic.rs
1 // revisions: mirunsafeck thirunsafeck
2 // [thirunsafeck]compile-flags: -Z thir-unsafeck
3
4 use std::rc::Rc;
5
6 union U<T: Copy> {
7     a: T
8 }
9
10 fn main() {
11     let u = U { a: Rc::new(0u32) };
12     //~^ ERROR  the trait bound `Rc<u32>: Copy` is not satisfied
13     let u = U::<Rc<u32>> { a: Default::default() };
14     //~^ ERROR  the trait bound `Rc<u32>: Copy` is not satisfied
15 }