rust-embedded / bare-metal

Abstractions common to microcontrollers
Apache License 2.0
116 stars 17 forks source link

Add const_unsafe_cell_new feature flag for nightly #2

Closed thenewwazoo closed 7 years ago

thenewwazoo commented 7 years ago

Fixes build failure:

error: `<core::cell::UnsafeCell<T>>::new` is not yet stable as a const fn
  --> /.../.cargo/registry/src/github.com-1ecc6299db9ec823/bare-metal-0.1.0/src/lib.rs:63:24
   |
63 |         Mutex { inner: UnsafeCell::new(value) }
   |                        ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: in Nightly builds, add `#![feature(const_unsafe_cell_new)]` to the crate attributes to enable

error: aborting due to previous error

error: Could not compile `bare-metal`.
japaric commented 7 years ago

Thanks, @thenewwazoo.