rust/tests/ui/union/union-sized-field.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
347 B
Rust
Raw Normal View History

2022-06-29 21:33:18 -05:00
use std::mem::ManuallyDrop;
union Foo<T: ?Sized> {
2022-06-29 21:33:18 -05:00
value: ManuallyDrop<T>,
2018-07-10 16:10:13 -05:00
//~^ ERROR the size for values of type
}
struct Foo2<T: ?Sized> {
2022-06-29 21:33:18 -05:00
value: ManuallyDrop<T>,
2018-07-10 16:10:13 -05:00
//~^ ERROR the size for values of type
t: u32,
}
enum Foo3<T: ?Sized> {
2022-06-29 21:33:18 -05:00
Value(ManuallyDrop<T>),
2018-07-10 16:10:13 -05:00
//~^ ERROR the size for values of type
}
fn main() {}