Hello,
I was trying to create a new project using Rocket and can't build. I get the following errors with version 0.3.2 of the rocket crate on Windows 10 when cargo attempts to compile the yansi crate.
Compiling state v0.3.1
Compiling yansi v0.3.3
Compiling rayon-core v1.2.1
Compiling idna v0.1.4
Compiling kernel32-sys v0.2.2
error: `<std::cell::UnsafeCell<T>>::new` is not yet stable as a const fn
--> %USERPROFILE%\.cargo\registry\src\github.com-1ecc6299db9ec823\state-0.3.1\src\container.rs:97:18
|
97 | map: UnsafeCell::new(0 as *mut _),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: in Nightly builds, add `#![feature(const_unsafe_cell_new)]` to the crate attributes to enable
error: `std::sync::atomic::AtomicUsize::new` is not yet stable as a const fn
--> %USERPROFILE%\.cargo\registry\src\github.com-1ecc6299db9ec823\state-0.3.1\src\container.rs:98:20
|
98 | mutex: AtomicUsize::new(0)
| ^^^^^^^^^^^^^^^^^^^
|
= help: in Nightly builds, add `#![feature(const_atomic_usize_new)]` to the crate attributes to enable
error: `<std::cell::UnsafeCell<T>>::new` is not yet stable as a const fn
--> %USERPROFILE%\.cargo\registry\src\github.com-1ecc6299db9ec823\state-0.3.1\src\storage.rs:72:19
|
72 | item: UnsafeCell::new(0 as *mut T),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: in Nightly builds, add `#![feature(const_unsafe_cell_new)]` to the crate attributes to enable
error: `std::sync::atomic::AtomicBool::new` is not yet stable as a const fn
--> %USERPROFILE%\.cargo\registry\src\github.com-1ecc6299db9ec823\state-0.3.1\src\init.rs:11:27
|
11 | init_started: AtomicBool::new(false),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: in Nightly builds, add `#![feature(const_atomic_bool_new)]` to the crate attributes to enable
error: `std::sync::atomic::AtomicBool::new` is not yet stable as a const fn
--> %USERPROFILE%\.cargo\registry\src\github.com-1ecc6299db9ec823\state-0.3.1\src\init.rs:12:24
|
12 | init_done: AtomicBool::new(false)
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: in Nightly builds, add `#![feature(const_atomic_bool_new)]` to the crate attributes to enable
error: aborting due to 5 previous errors
error: Could not compile `state`.
warning: build failed, waiting for other jobs to finish...
error: `std::sync::atomic::AtomicBool::new` is not yet stable as a const fn
--> %USERPROFILE%\.cargo\registry\src\github.com-1ecc6299db9ec823\yansi-0.3.3\src\lib.rs:479:57
|
479 | #[cfg(feature="nightly")] static DISABLED: AtomicBool = AtomicBool::new(false);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: in Nightly builds, add `#![feature(const_atomic_bool_new)]` to the crate attributes to enable
error: aborting due to previous error
error: Could not compile `yansi`.
warning: build failed, waiting for other jobs to finish...
error: build failed
This is due to changes in the latest nightly brought on by https://github.com/rust-lang/rust/pull/43017. Taking care of this now.
A cargo update coupled with a rustup update should resolve these issues. Thanks for reporting this! And thanks to @Amanieu for the quick resolution on https://github.com/Amanieu/parking_lot/pull/42.
Most helpful comment
A
cargo updatecoupled with arustup updateshould resolve these issues. Thanks for reporting this! And thanks to @Amanieu for the quick resolution on https://github.com/Amanieu/parking_lot/pull/42.