diff options
| author | Corey Richardson <corey@octayn.net> | 2014-05-26 23:56:52 -0700 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2014-08-20 21:02:23 -0400 |
| commit | 6e8ff999589a7b4c7f62f7128f3e028a7b3ea64f (patch) | |
| tree | 71eb65a9aefa3503f15b4bd8245f36081f658c27 /src/test/debuginfo/c-style-enum-in-composite.rs | |
| parent | 54bd9e6323742de87a526931a15558319db30604 (diff) | |
| download | rust-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.rs | 2 |
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, |
