]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-sized-field.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[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() {}