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

Failed to Build: error[E0658] #21

Closed
f35f0ef9d0e827dae86552d3899f78fc opened this issue Mar 20, 2022 · 0 comments
Closed

Failed to Build: error[E0658] #21

f35f0ef9d0e827dae86552d3899f78fc opened this issue Mar 20, 2022 · 0 comments
Labels

Comments

@f35f0ef9d0e827dae86552d3899f78fc

TL;DR

To fix this error, run rustup update to get the latest Rust toolchains installed.

Details

I actually solved this problem and just wanted to document it for anyone in the future.

Original Error

cargo install --git https://github.com/dsprenkels/sss-cli --branch v0.1

Updating git repository https://github.com/dsprenkels/sss-cli
Installing shamirsecretsharing-cli v0.1.1 (https://github.com/dsprenkels/sss-cli?branch=v0.1#d327af9d)
Updating crates.io index
Compiling libc v0.2.121
Compiling cfg-if v1.0.0
Compiling getrandom v0.1.16
Compiling memchr v2.4.1
Compiling cc v1.0.73
Compiling log v0.4.14
Compiling unicode-width v0.1.9
Compiling ppv-lite86 v0.2.16
Compiling regex-syntax v0.6.25
Compiling quick-error v1.2.3
Compiling ansi_term v0.12.1
Compiling bitflags v1.3.2
Compiling strsim v0.8.0
Compiling termcolor v1.1.3
Compiling humantime v1.3.0
Compiling textwrap v0.11.0
Compiling aho-corasick v0.7.18
Compiling atty v0.2.14
Compiling clap v2.34.0
Compiling rand_core v0.5.1
Compiling rand_chacha v0.2.2
error[E0658]: if is not allowed in a const fn
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.34.0/src/app/settings.rs:7:1
|
7 | / bitflags! {
8 | | struct Flags: u64 {
9 | | const SC_NEGATE_REQS = 1;
10 | | const SC_REQUIRED = 1 << 1;
... |
51 | | }
52 | | }
| |_^
|
= note: see issue #49146 rust-lang/rust#49146 for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: if is not allowed in a const fn
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.34.0/src/args/settings.rs:6:1
|
6 | / bitflags! {
7 | | struct Flags: u32 {
8 | | const REQUIRED = 1;
9 | | const MULTIPLE = 1 << 1;
... |
28 | | }
29 | | }
| |_^
|
= note: see issue #49146 rust-lang/rust#49146 for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

Compiling rand v0.7.3
Compiling regex v1.5.5
error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0658.
error: could not compile clap.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `shamirsecretsharing-cli v0.1.1

Before Updating

This is the version that caused the error.

rustup show

Default host: x86_64-unknown-linux-gnu
rustup home: ~/.rustup

installed toolchains


stable-x86_64-unknown-linux-gnu (default)
nightly-2020-10-25-x86_64-unknown-linux-gnu
nightly-2021-01-01-x86_64-unknown-linux-gnu
nightly-2021-05-18-x86_64-unknown-linux-gnu
nightly-2021-07-06-x86_64-unknown-linux-gnu

active toolchain


stable-x86_64-unknown-linux-gnu (default)
rustc 1.43.1 (8d69840ab 2020-05-04)

After Updating

I was able to install with this version.

rustup show

Default host: x86_64-unknown-linux-gnu
rustup home: ~/.rustup

installed toolchains


stable-x86_64-unknown-linux-gnu (default)
nightly-2020-10-25-x86_64-unknown-linux-gnu
nightly-2021-01-01-x86_64-unknown-linux-gnu
nightly-2021-05-18-x86_64-unknown-linux-gnu
nightly-2021-07-06-x86_64-unknown-linux-gnu

active toolchain


stable-x86_64-unknown-linux-gnu (default)
rustc 1.59.0 (9d1b2106e 2022-02-23)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants