diff --git a/gc/src/gc.rs b/gc/src/gc.rs index 9526c28..244022e 100644 --- a/gc/src/gc.rs +++ b/gc/src/gc.rs @@ -160,7 +160,7 @@ impl< // Create a pointer with the metadata of value and the // address and provenance of the GcBox. - let gcbox = set_data_ptr(value as *mut GcBox, gcbox_addr); + let gcbox = set_data_ptr(value.cast::>(), gcbox_addr); // Move the data. ptr::addr_of_mut!((*gcbox).header).write(GcBoxHeader::new());