mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-14 16:03:17 +00:00
Add test case for Issue 2895
This commit is contained in:
parent
7d84505654
commit
d29328617d
16
src/test/run-pass/issue-2895.rs
Normal file
16
src/test/run-pass/issue-2895.rs
Normal file
@ -0,0 +1,16 @@
|
||||
use sys::size_of;
|
||||
extern mod std;
|
||||
|
||||
struct Cat {
|
||||
x: int
|
||||
}
|
||||
|
||||
struct Kitty {
|
||||
x: int,
|
||||
drop {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
assert (size_of::<Cat>() == 8 as uint);
|
||||
assert (size_of::<Kitty>() == 16 as uint);
|
||||
}
|
Loading…
Reference in New Issue
Block a user