= note: see issue #49146 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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
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
Before Updating
This is the version that caused the error.
rustup show
After Updating
I was able to install with this version.
rustup show