Skip to content

Commit 4b29d18

Browse files
committed
fix(alloc_ref): use renamed dangling
As of nightly-2026-01-19, `dangling` was renamed to `dangling_ptr`: rust-lang/rust#148769 (comment) This closes #88.
1 parent b5caf32 commit 4b29d18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl Heap {
267267
unsafe impl Allocator for LockedHeap {
268268
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
269269
if layout.size() == 0 {
270-
return Ok(NonNull::slice_from_raw_parts(layout.dangling(), 0));
270+
return Ok(NonNull::slice_from_raw_parts(layout.dangling_ptr(), 0));
271271
}
272272
match self.0.lock().allocate_first_fit(layout) {
273273
Ok(ptr) => Ok(NonNull::slice_from_raw_parts(ptr, layout.size())),

0 commit comments

Comments
 (0)