We need to use the type *mut GcBoxInner<T> when computing a pointer to the value field, since the field location depends on the alignment of T. Using *mut GcBoxInner<()> will happen to work correctly when the original value field didn't require any padding, but will break when the alignment of T causes padding to be inserted into GcBoxInner<T>.
We need to use the type
*mut GcBoxInner<T>
when computing a pointer to thevalue
field, since the field location depends on the alignment ofT
. Using*mut GcBoxInner<()>
will happen to work correctly when the originalvalue
field didn't require any padding, but will break when the alignment ofT
causes padding to be inserted intoGcBoxInner<T>
.