From e94cf15ebeee9317d3194a4f605d45fe84d508dc Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 27 Jan 2023 22:00:03 -0800 Subject: [PATCH] Fix clippy::ptr_as_ptr (pedantic) https://rust-lang.github.io/rust-clippy/master/index.html#ptr_as_ptr Signed-off-by: Anders Kaseorg --- gc/src/gc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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());