From bfa42176880ca81c008a2672cc4ff4312fce5592 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 29 Nov 2023 08:52:13 -0700 Subject: [PATCH] Remove `invalid_mut` when `writer.std` --- 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 _ } };