Closed
Description
On stable, beta, and nightly, the follow code prints 16
followed by 24
:
struct Foo<T: ?Sized> {
a: i64,
b: bool,
c: T,
}
fn main() {
let a = Box::new(Foo {a: 1, b: false, c: 1u32});
println!("{}", std::mem::size_of_val(&*a));
let a: Box<Foo<Send>> = a;
println!("{}", std::mem::size_of_val(&*a));
}
CC #27023
Metadata
Metadata
Assignees
Labels
No labels