Skip to content

Crate does not compile #39

@bugadani

Description

@bugadani

https://github.com/phil-opp/linked-list-allocator/blob/b1332a3268b07dcac60f109e6d56634e0a8fe61c/src/hole.rs#L14

For whatever reason, I had no issues so far, however, today I was greeted with the following error:

error[E0658]: mutable references are not allowed in constant functions
  --> /home/dani/.cargo/registry/src/github.com-1ecc6299db9ec823/linked_list_allocator-0.8.5/src/hole.rs:18:23
   |
18 |                 next: None,
   |                       ^^^^
   |
   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

What's weird to me, is that I was able to use the crate for months without any complaint from the compiler, but I did not find a compiler on godbolt.org that compiled the relevant bits of code. Maybe something was broken for months in nightly?

Anyways, the versions I tried:

  • 2020-09-22 (1.48 nightly) compiles fine
  • 2020-10-21 (1.49 nightly) has the above error

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