]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/issue-81199.rs
Rollup merge of #100462 - zohnannor:master, r=thomcc
[rust.git] / src / test / ui / union / issue-81199.rs
1 #[repr(C)]
2 union PtrRepr<T: ?Sized> {
3     const_ptr: *const T,
4     mut_ptr: *mut T,
5     components: PtrComponents<T>,
6     //~^ ERROR the trait bound
7 }
8
9 #[repr(C)]
10 struct PtrComponents<T: Pointee + ?Sized> {
11     data_address: *const (),
12     metadata: <T as Pointee>::Metadata,
13 }
14
15
16
17 pub trait Pointee {
18    type Metadata;
19 }
20
21 fn main() {}