about summary refs log tree commit diff
path: root/src/test/debuginfo/c-style-enum-in-composite.rs
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-05-26 23:56:52 -0700
committerCorey Richardson <corey@octayn.net>2014-08-20 21:02:23 -0400
commit6e8ff999589a7b4c7f62f7128f3e028a7b3ea64f (patch)
tree71eb65a9aefa3503f15b4bd8245f36081f658c27 /src/test/debuginfo/c-style-enum-in-composite.rs
parent54bd9e6323742de87a526931a15558319db30604 (diff)
downloadrust-6e8ff999589a7b4c7f62f7128f3e028a7b3ea64f.tar.gz
rust-6e8ff999589a7b4c7f62f7128f3e028a7b3ea64f.zip
librustc: handle repr on structs, require it for ffi, unify with packed
As of RFC 18, struct layout is undefined. Opting into a C-compatible struct
layout is now down with #[repr(C)]. For consistency, specifying a packed
layout is now also down with #[repr(packed)]. Both can be specified.

To fix errors caused by this, just add #[repr(C)] to the structs, and change
 #[packed] to #[repr(packed)]

Closes #14309

[breaking-change]
Diffstat (limited to 'src/test/debuginfo/c-style-enum-in-composite.rs')
-rw-r--r--src/test/debuginfo/c-style-enum-in-composite.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/debuginfo/c-style-enum-in-composite.rs b/src/test/debuginfo/c-style-enum-in-composite.rs
index f7351728290..ef23e7ee876 100644
--- a/src/test/debuginfo/c-style-enum-in-composite.rs
+++ b/src/test/debuginfo/c-style-enum-in-composite.rs
@@ -87,7 +87,7 @@ struct PaddedStruct {
     e: i16
 }
 
-#[packed]
+#[repr(packed)]
 struct PackedStruct {
     a: i16,
     b: AnEnum,