diff --git a/src/reference_wrapper.rs b/src/reference_wrapper.rs index 041bd7277..529f070be 100644 --- a/src/reference_wrapper.rs +++ b/src/reference_wrapper.rs @@ -412,7 +412,7 @@ impl CppPin { // to // Box> // is safe. - let contents = unsafe { std::mem::transmute(item) }; + let contents = unsafe { std::mem::transmute::, Box>>(item) }; Self(contents) }