Skip to content

Unable to build on rust version 1.43.0-nightly  #24

Closed

Description

@luojia65

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

Activity

  1. mtnygard commented on Mar 6, 2020

    @mtnygard

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions