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