From f94f03b6c0fb657d18c41f6e67b99b10a0e4b137 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 6 Dec 2023 20:04:30 +0000 Subject: [PATCH] Remove `invalid_mut` when `writer.std` (#2727) --- crates/libs/bindgen/src/rust/constants.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/libs/bindgen/src/rust/constants.rs b/crates/libs/bindgen/src/rust/constants.rs index 5acca64b9e..e537c84a77 100644 --- a/crates/libs/bindgen/src/rust/constants.rs +++ b/crates/libs/bindgen/src/rust/constants.rs @@ -43,8 +43,6 @@ pub fn writer(writer: &Writer, def: Field) -> TokenStream { let value = if underlying_type == constant_type { value - } else if writer.std && underlying_type == Type::ISize { - quote! { ::core::ptr::invalid_mut(#value as _) } } else { quote! { #value as _ } };