We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 856fd72 commit 244f2a3Copy full SHA for 244f2a3
src/lib.rs
@@ -45,9 +45,15 @@ pub fn raw<T>(data: T) -> *mut T {
45
}
46
47
#[deprecated(since = "0.7.2", note = "Use `own_back<T>()` instead")]
48
-#[allow(missing_docs)]
49
#[cfg(any(feature = "alloc", feature = "std"))]
50
#[inline]
+/// Call to `own_back<T>(pointer: *mut T)` ignoring the result.
51
+///
52
+/// This ignore null pointers without an error.
53
54
+/// # Safety
55
56
+/// Invalid pointer or call it twice could cause an undefined behavior or heap error and a crash.
57
pub unsafe fn free<T>(pointer: *mut T) {
58
let _ = own_back(pointer); // Ignore the must use lint as previous behavior was ignore null pointers
59
0 commit comments