auto merge of #6265 : sanxiyn/rust/xc-packed, r=nikomatsakis
This commit is contained in:
commit
a5891bebc1
3 changed files with 14 additions and 0 deletions
|
@ -819,6 +819,7 @@ fn encode_info_for_item(ecx: @EncodeContext,
|
|||
}
|
||||
|
||||
encode_name(ecx, ebml_w, item.ident);
|
||||
encode_attributes(ebml_w, item.attrs);
|
||||
encode_path(ecx, ebml_w, path, ast_map::path_name(item.ident));
|
||||
encode_region_param(ecx, ebml_w, item);
|
||||
|
||||
|
|
5
src/test/auxiliary/packed.rs
Normal file
5
src/test/auxiliary/packed.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
#[packed]
|
||||
struct S {
|
||||
a: u8,
|
||||
b: u32
|
||||
}
|
8
src/test/run-pass/packed-struct-size-xc.rs
Normal file
8
src/test/run-pass/packed-struct-size-xc.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
// xfail-fast
|
||||
// aux-build:packed.rs
|
||||
|
||||
extern mod packed;
|
||||
|
||||
fn main() {
|
||||
assert_eq!(sys::size_of::<packed::S>(), 5);
|
||||
}
|
Loading…
Add table
Reference in a new issue