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 e6414d2 commit fcc6c7bCopy full SHA for fcc6c7b
src/liballoc/alloc.rs
@@ -177,6 +177,11 @@ unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
177
#[cfg_attr(not(test), lang = "box_free")]
178
#[inline]
179
pub(crate) unsafe fn box_free<T: ?Sized, A: Alloc>(ptr: Unique<T>, mut a: A) {
180
+ box_free_worker(ptr, &mut a)
181
+}
182
+
183
+#[inline]
184
+pub(crate) unsafe fn box_free_worker<T: ?Sized, A: Alloc>(ptr: Unique<T>, a: &mut A) {
185
let ptr = ptr.as_ptr();
186
let size = size_of_val(&*ptr);
187
let align = min_align_of_val(&*ptr);
0 commit comments