We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
size_of
1 parent b0c72aa commit 10946b7Copy full SHA for 10946b7
src/librustc_mir/interpret/intrinsics.rs
@@ -70,7 +70,7 @@ crate fn eval_nullary_intrinsic<'tcx>(
70
let n = match name {
71
"pref_align_of" => layout.pref_pos.align.pref.bytes(),
72
"min_align_of" => layout.pref_pos.align.abi.bytes(),
73
- "size_of" => layout.pref_pos.size.bytes(),
+ "size_of" => layout.pref_pos.stride().bytes(),
74
_ => bug!(),
75
};
76
ty::Const::from_usize(tcx, n)
0 commit comments