rust/tests/ui/union/union-generic.rs
Matthew Jasper 982b49494e Remove revisions for THIR unsafeck
This is to make the diff when stabilizing it easier to review.
2024-01-05 09:30:27 +00:00

13 lines
281 B
Rust

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
}