From 502817a9c19752cafcc270d9d3e5a5104ce2eac9 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Mon, 6 May 2013 23:35:27 +0900 Subject: Fix cross-crate packed structs --- src/test/auxiliary/packed.rs | 5 +++++ src/test/run-pass/packed-struct-size-xc.rs | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/test/auxiliary/packed.rs create mode 100644 src/test/run-pass/packed-struct-size-xc.rs (limited to 'src/test') diff --git a/src/test/auxiliary/packed.rs b/src/test/auxiliary/packed.rs new file mode 100644 index 00000000000..478d51b540c --- /dev/null +++ b/src/test/auxiliary/packed.rs @@ -0,0 +1,5 @@ +#[packed] +struct S { + a: u8, + b: u32 +} diff --git a/src/test/run-pass/packed-struct-size-xc.rs b/src/test/run-pass/packed-struct-size-xc.rs new file mode 100644 index 00000000000..ddfc2b17aa7 --- /dev/null +++ b/src/test/run-pass/packed-struct-size-xc.rs @@ -0,0 +1,8 @@ +// xfail-fast +// aux-build:packed.rs + +extern mod packed; + +fn main() { + assert_eq!(sys::size_of::(), 5); +} -- cgit 1.4.1-3-g733a5