Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yansi Fails to Compile Using cargo #433

Closed
kaftw opened this issue Sep 17, 2017 · 2 comments
Closed

yansi Fails to Compile Using cargo #433

kaftw opened this issue Sep 17, 2017 · 2 comments
Labels
upstream An unresolvable issue: an upstream dependency bug

Comments

@kaftw
Copy link

kaftw commented Sep 17, 2017

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
@SergioBenitez SergioBenitez added the upstream An unresolvable issue: an upstream dependency bug label Sep 17, 2017
@SergioBenitez
Copy link
Member

SergioBenitez commented Sep 17, 2017

This is due to changes in the latest nightly brought on by rust-lang/rust#43017. Taking care of this now.

@SergioBenitez
Copy link
Member

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 Amanieu/parking_lot#42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream An unresolvable issue: an upstream dependency bug
Projects
None yet
Development

No branches or pull requests

2 participants