SergioBenitez / state

A Rust library for safe and effortless global and thread-local state management.
Other
213 stars 14 forks source link

"Unstable library feature" Error while compiling #11

Closed Misterio77 closed 3 years ago

Misterio77 commented 3 years ago

Hey!

Thanks for all the work with rocket, and all related libraries.

Since an update on Rocket, i can't seem to get state to compile. I've narrowed it down to state's https://github.com/SergioBenitez/state/commit/7576652ae4e1d9f673243913a8a2c2108a7e3f5c commit. (To which rocket updated on commit https://github.com/SergioBenitez/Rocket/commit/63a14525d86595a8033715e3bdcd2bf2581eecb1).

Here's how the error looks like:

error[E0658]: use of unstable library feature 'unsafe_cell_get_mut'
  --> /home/misterio/.cargo/git/checkouts/state-461be979d187f8b7/504ef71/src/shim.rs:41:40
   |
41 |             #[cfg(not(loom))] { self.0.get_mut() }
   |                                        ^^^^^^^
   |
   = note: see issue #76943 <https://github.com/rust-lang/rust/issues/76943> for more information

error: aborting due to previous error

If i understand correctly, this seems to require users to use unstable features? Can i somehow get it to work without nightly builds?

Thanks a lot!

SergioBenitez commented 3 years ago

You simply need to update to a newer stable release. This feature was stabilized in 1.50.

Misterio77 commented 3 years ago

Oops my mistake. It seems that unsafe_cell_get_mut was stabilized in rust 1.50, which didn't auto update on my system because i forgot rustup won't update together with my system.

Sorry for the trouble, and thanks anyway <3