about summary refs log tree commit diff
path: root/src/libstd/rt
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/libstd/rt
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/libstd/rt')
-rw-r--r--src/libstd/rt/backtrace.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs
index a4491b2ab1d..5ef1286500c 100644
--- a/src/libstd/rt/backtrace.rs
+++ b/src/libstd/rt/backtrace.rs
@@ -701,7 +701,7 @@ mod imp {
     static IMAGE_FILE_MACHINE_IA64: libc::DWORD = 0x0200;
     static IMAGE_FILE_MACHINE_AMD64: libc::DWORD = 0x8664;
 
-    #[packed]
+    #[repr(packed)]
     struct SYMBOL_INFO {
         SizeOfStruct: libc::c_ulong,
         TypeIndex: libc::c_ulong,