diff options
| author | Austin Hicks <camlorn@camlorn.net> | 2016-11-22 15:18:28 -0500 |
|---|---|---|
| committer | Austin Hicks <camlorn@camlorn.net> | 2016-12-14 12:28:23 -0500 |
| commit | 74f5c61d288fdd925968aca49d1fd82f6e226ff8 (patch) | |
| tree | e6cf7b590dd0db8e17c2b65e114694837ec555d4 | |
| parent | 5adf6943a7c3fadf42688d63204e40dff7326095 (diff) | |
| download | rust-74f5c61d288fdd925968aca49d1fd82f6e226ff8.tar.gz rust-74f5c61d288fdd925968aca49d1fd82f6e226ff8.zip | |
Change how type-sizes works slightly: we want to ensure that [i16; 0] introduces padding
| -rw-r--r-- | src/test/run-pass/type-sizes.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/run-pass/type-sizes.rs b/src/test/run-pass/type-sizes.rs index 8c58ec3e526..359f825bb63 100644 --- a/src/test/run-pass/type-sizes.rs +++ b/src/test/run-pass/type-sizes.rs @@ -26,6 +26,7 @@ enum e2 { a(u32), b } +#[repr(u8)] enum e3 { a([u16; 0], u8), b } @@ -52,5 +53,5 @@ pub fn main() { assert_eq!(size_of::<e1>(), 8 as usize); assert_eq!(size_of::<e2>(), 8 as usize); - assert_eq!(size_of::<e3>(), 2 as usize); + assert_eq!(size_of::<e3>(), 4 as usize); } |
