]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-sized-field.rs
Rollup merge of #100462 - zohnannor:master, r=thomcc
[rust.git] / src / test / ui / union / union-sized-field.rs
1 use std::mem::ManuallyDrop;
2
3 union Foo<T: ?Sized> {
4     value: ManuallyDrop<T>,
5     //~^ ERROR the size for values of type
6 }
7
8 struct Foo2<T: ?Sized> {
9     value: ManuallyDrop<T>,
10     //~^ ERROR the size for values of type
11     t: u32,
12 }
13
14 enum Foo3<T: ?Sized> {
15     Value(ManuallyDrop<T>),
16     //~^ ERROR the size for values of type
17 }
18
19 fn main() {}