diff options
-rw-r--r-- | ffi-macros/src/lib.rs | 2 | ||||
-rw-r--r-- | openpgp-ffi/src/common.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ffi-macros/src/lib.rs b/ffi-macros/src/lib.rs index d398e32d..ad237238 100644 --- a/ffi-macros/src/lib.rs +++ b/ffi-macros/src/lib.rs @@ -430,7 +430,7 @@ fn derive_conversion_functions(mut st: syn::ItemStruct, } use RefMutRaw; - impl RefMutRaw<#wrapped> for *mut #wrapper { + impl RefMutRaw<&'static mut #wrapped> for *mut #wrapper { fn ref_mut_raw(self) -> &'static mut #wrapped { if self.is_null() { panic!("FFI contract violation: Parameter is NULL"); diff --git a/openpgp-ffi/src/common.rs b/openpgp-ffi/src/common.rs index ba2ce7d2..e6c67db4 100644 --- a/openpgp-ffi/src/common.rs +++ b/openpgp-ffi/src/common.rs @@ -244,7 +244,7 @@ pub(crate) trait RefRaw<T> { /// Moves a mutable reference to an object from C to Rust. pub(crate) trait RefMutRaw<T> { /// Moves this mutable reference to an object from C to Rust. - fn ref_mut_raw(self) -> &'static mut T; + fn ref_mut_raw(self) -> T; } /// Moves an object from Rust to C, releasing ownership. |