]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-generic.rs
Rollup merge of #65777 - matthewjasper:allow-impl-trait-expansion, r=davidtwco
[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 `std::rc::Rc<u32>: std::marker::Copy` is not satisfied
10     let u = U::<Rc<u32>> { a: Default::default() };
11     //~^ ERROR  the trait bound `std::rc::Rc<u32>: std::marker::Copy` is not satisfied
12 }