Skip to content

Commit f0de36d

Browse files
committed
The oom function is now a lang item
See rust-lang/rust#50144
1 parent 8044482 commit f0de36d

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/lib.rs

-8
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ unsafe impl Alloc for Heap {
135135
unsafe fn dealloc(&mut self, ptr: NonNull<Opaque>, layout: Layout) {
136136
self.deallocate(ptr, layout)
137137
}
138-
139-
fn oom(&mut self) -> ! {
140-
panic!("Out of memory");
141-
}
142138
}
143139

144140
#[cfg(feature = "use_spin")]
@@ -188,10 +184,6 @@ unsafe impl GlobalAlloc for LockedHeap {
188184
.lock()
189185
.deallocate(NonNull::new_unchecked(ptr), layout)
190186
}
191-
192-
fn oom(&self) -> ! {
193-
panic!("Out of memory");
194-
}
195187
}
196188

197189
/// Align downwards. Returns the greatest x with alignment `align`

0 commit comments

Comments
 (0)