Skip to content

Unable to build on rust version 1.43.0-nightly #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
luojia65 opened this issue Mar 5, 2020 · 1 comment · Fixed by #25
Closed

Unable to build on rust version 1.43.0-nightly #24

luojia65 opened this issue Mar 5, 2020 · 1 comment · Fixed by #25

Comments

@luojia65
Copy link

luojia65 commented Mar 5, 2020

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).

@mtnygard
Copy link

mtnygard commented Mar 6, 2020

This error is observed when attempting to build phil-opp/blog_os.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants