Closed
Description
I tried to build following code with dependency on linked-list-allocator
version 0.7.0
:
use linked_list_allocator::LockedHeap;
However I got this error:
error[E0053]: method `alloc` has an incompatible type for trait
--> /Users/mac/.cargo/registry/src/github.com-1ecc6299db9ec823/linked_list_allocator-0.7.0/src/lib.rs:133:5
|
133 | unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found struct `core::ptr::NonNull`
|
= note: expected fn pointer `unsafe fn(&mut Heap, core::alloc::Layout) -> core::result::Result<(core::ptr::NonNull<u8>, usize), _>`
found fn pointer `unsafe fn(&mut Heap, core::alloc::Layout) -> core::result::Result<core::ptr::NonNull<u8>, _>`
My Rust version is rustc 1.43.0-nightly (75cf41afb 2020-03-04)
.
Metadata
Metadata
Assignees
Labels
No labels