From 99414311396d994684efb915b153ddcc40b5ba41 Mon Sep 17 00:00:00 2001 From: "Jip J. Dekker" Date: Fri, 26 Apr 2024 19:58:29 +1000 Subject: [PATCH] Fix invalid coercion --- crates/pindakaas-derive/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/pindakaas-derive/src/lib.rs b/crates/pindakaas-derive/src/lib.rs index 855067f1bd..74ddc92998 100644 --- a/crates/pindakaas-derive/src/lib.rs +++ b/crates/pindakaas-derive/src/lib.rs @@ -274,7 +274,11 @@ pub fn ipasir_solver_derive(input: TokenStream) -> TokenStream { #sol_ident { ptr: self.ptr, #[cfg(feature = "ipasir-up")] - prop: if let Some(p) = &mut #prop_member { Some((&mut (p.prop)) as *mut _ as *mut std::ffi::c_void) } else { None }, + prop: if let Some(p) = #prop_member .as_mut() { + Some((&mut (*p.prop)) as *mut _ as *mut std::ffi::c_void) + } else { + None + }, } } }