diff options
Diffstat (limited to 'src/test/ui/union/union-sized-field.rs')
-rw-r--r-- | src/test/ui/union/union-sized-field.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/union/union-sized-field.rs b/src/test/ui/union/union-sized-field.rs new file mode 100644 index 000000000..cb852eff0 --- /dev/null +++ b/src/test/ui/union/union-sized-field.rs @@ -0,0 +1,19 @@ +use std::mem::ManuallyDrop; + +union Foo<T: ?Sized> { + value: ManuallyDrop<T>, + //~^ ERROR the size for values of type +} + +struct Foo2<T: ?Sized> { + value: ManuallyDrop<T>, + //~^ ERROR the size for values of type + t: u32, +} + +enum Foo3<T: ?Sized> { + Value(ManuallyDrop<T>), + //~^ ERROR the size for values of type +} + +fn main() {} |