2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2016-08-27 00:51:55 -05:00
|
|
|
use std::mem;
|
|
|
|
|
|
|
|
struct Foo<T: ?Sized> {
|
|
|
|
a: i64,
|
|
|
|
b: bool,
|
|
|
|
c: T,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let foo: &Foo<i32> = &Foo { a: 1, b: false, c: 2i32 };
|
2019-05-28 13:47:21 -05:00
|
|
|
let foo_unsized: &Foo<dyn Send> = foo;
|
2016-08-27 00:51:55 -05:00
|
|
|
assert_eq!(mem::size_of_val(foo), mem::size_of_val(foo_unsized));
|
|
|
|
}
|