pub const fn man_drop_ref<T>(man: &ManuallyDrop<T>) -> &T
Expand description
Gets a reference to the contents of a ManuallyDrop
.
This function is a const version of the Deref
implementation of ManuallyDrop
.
ยงExample
use const_util::mem::man_drop_ref;
use core::mem::ManuallyDrop;
assert_eq!(man_drop_ref(&ManuallyDrop::new(1)), &1);