You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0658]: `if` is not allowed in a `const fn`
--> /home/ruiqurm/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/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 <https://github.com/rust-lang/rust/issues/49146> for more information
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
= 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`
--> /home/ruiqurm/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/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
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
Compiling addr2line v0.17.0
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`.
Compiling backtrace v0.3.5
error[E0425]: cannot find value `RTLD_LAZY` in crate `libc`
--> /home/ruiqurm/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/backtrace-0.3.5/src/dylib.rs:30:70
|
30 | let ptr = libc::dlopen(name.as_ptr() as *const c_char, libc::RTLD_LAZY);
| ^^^^^^^^^ not found in `libc`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0425`.
error: could not compile `backtrace`.
(可能的)解决方案
切换nightly到stable:
rustup override set stable
The text was updated successfully, but these errors were encountered:
欢迎提出任何问题
环境
rustc 1.62.0-nightly
wsl2 Ubuntu 20.04
遇到问题
安装环境时,
cargo install cargo-binutils
失败。安装依赖
clap v2.34.0
时,提示:尝试添加标志
-Z minimal-versions
:cargo install cargo-binutils -Z minimal-versions
在编译
backtrace v0.3.5
处失败:(可能的)解决方案
切换nightly到stable:
The text was updated successfully, but these errors were encountered: