rust-osdev / linked-list-allocator

Apache License 2.0
219 stars 53 forks source link

Crate does not compile #39

Closed bugadani closed 3 years ago

bugadani commented 3 years ago

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:

phil-opp commented 3 years ago

Yeah, there was some nightly breakage a few weeks ago. Try updating the crate to version 0.8.6.

bugadani commented 3 years ago

Huh, thanks a lot :)