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

Installation error - error[E0658]: arbitrary expressions in key-value attributes are unstable #1

Closed
valmormn opened this issue Sep 13, 2021 · 5 comments

Comments

@valmormn
Copy link

Tried to install it with both stable and nightly version of rust and got the same error

For more information about this error, try `rustc --explain E0658`.
error: failed to compile `lolcrab v0.1.0`, intermediate artifacts can be found at `/tmp/cargo-installGIyozr`

Caused by:
  could not compile `clap`

@mazznoer
Copy link
Owner

Please run rustup update and try installing again.

@valmormn
Copy link
Author

Unfortunately, it happened again even though I've run "rustup update"

`
❯ cargo install lolcrab
Updating crates.io index
Installing lolcrab v0.1.0
Compiling libc v0.2.101
Compiling getrandom v0.1.16
Compiling proc-macro2 v1.0.29
Compiling unicode-xid v0.2.2
Compiling cfg-if v1.0.0
Compiling syn v1.0.76
Compiling version_check v0.9.3
Compiling ppv-lite86 v0.2.10
Compiling siphasher v0.3.7
Compiling proc-macro-hack v0.5.19
Compiling autocfg v1.0.1
Compiling memchr v2.4.1
Compiling unicode-segmentation v1.8.0
Compiling lazy_static v1.4.0
Compiling hashbrown v0.11.2
Compiling unicode-width v0.1.8
Compiling vec_map v0.8.2
Compiling regex-automata v0.1.10
Compiling os_str_bytes v3.1.0
Compiling termcolor v1.1.2
Compiling strsim v0.10.0
Compiling bitflags v1.3.2
Compiling fastrand v1.5.0
Compiling phf_shared v0.8.0
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling indexmap v1.7.0
Compiling textwrap v0.14.2
Compiling heck v0.3.3
Compiling atty v0.2.14
Compiling quote v1.0.9
Compiling rand_core v0.5.1
Compiling bstr v0.2.16
Compiling rand_pcg v0.2.1
Compiling rand_chacha v0.2.2
Compiling rand_xorshift v0.2.0
Compiling rand v0.7.3
Compiling noise v0.7.0
Compiling phf_generator v0.8.0
Compiling phf_macros v0.8.0
Compiling clap_derive v3.0.0-beta.4
Compiling phf v0.8.0
Compiling csscolorparser v0.5.0
Compiling colorgrad v0.5.0
Compiling clap v3.0.0-beta.4
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/v/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.4/src/lib.rs:8:10
|
8 | #![doc = include_str!("../README.md")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #78835 rust-lang/rust#78835 for more information

error[E0658]: use of unstable library feature 'osstring_ascii'
--> /home/v/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.4/src/parse/matches/matched_arg.rs:130:19
|
130 | v.eq_ignore_ascii_case(val)
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #70516 rust-lang/rust#70516 for more information

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0658.
error: failed to compile lolcrab v0.1.0, intermediate artifacts can be found at /tmp/cargo-installfcSU7G

Caused by:
could not compile clap

`

@mazznoer mazznoer added the help wanted Extra attention is needed label Sep 14, 2021
@valmormn
Copy link
Author

valmormn commented Sep 14, 2021

Unfortunately, it happened again even though I've run "rustup update"

`
❯ cargo install lolcrab
Updating crates.io index
Installing lolcrab v0.1.0
Compiling libc v0.2.101
Compiling getrandom v0.1.16
Compiling proc-macro2 v1.0.29
Compiling unicode-xid v0.2.2
Compiling cfg-if v1.0.0
Compiling syn v1.0.76
Compiling version_check v0.9.3
Compiling ppv-lite86 v0.2.10
Compiling siphasher v0.3.7
Compiling proc-macro-hack v0.5.19
Compiling autocfg v1.0.1
Compiling memchr v2.4.1
Compiling unicode-segmentation v1.8.0
Compiling lazy_static v1.4.0
Compiling hashbrown v0.11.2
Compiling unicode-width v0.1.8
Compiling vec_map v0.8.2
Compiling regex-automata v0.1.10
Compiling os_str_bytes v3.1.0
Compiling termcolor v1.1.2
Compiling strsim v0.10.0
Compiling bitflags v1.3.2
Compiling fastrand v1.5.0
Compiling phf_shared v0.8.0
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling indexmap v1.7.0
Compiling textwrap v0.14.2
Compiling heck v0.3.3
Compiling atty v0.2.14
Compiling quote v1.0.9
Compiling rand_core v0.5.1
Compiling bstr v0.2.16
Compiling rand_pcg v0.2.1
Compiling rand_chacha v0.2.2
Compiling rand_xorshift v0.2.0
Compiling rand v0.7.3
Compiling noise v0.7.0
Compiling phf_generator v0.8.0
Compiling phf_macros v0.8.0
Compiling clap_derive v3.0.0-beta.4
Compiling phf v0.8.0
Compiling csscolorparser v0.5.0
Compiling colorgrad v0.5.0
Compiling clap v3.0.0-beta.4
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/v/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.4/src/lib.rs:8:10
|
8 | #![doc = include_str!("../README.md")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #78835 rust-lang/rust#78835 for more information

error[E0658]: use of unstable library feature 'osstring_ascii'
--> /home/v/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.4/src/parse/matches/matched_arg.rs:130:19
|
130 | v.eq_ignore_ascii_case(val)
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #70516 rust-lang/rust#70516 for more information

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0658.
error: failed to compile lolcrab v0.1.0, intermediate artifacts can be found at /tmp/cargo-installfcSU7G

Caused by:
could not compile clap

`

The error happens when trying to compile "clap v3.0.0-beta.4".
I get no error when compiling "clap v2.33.3".

At https://github.com/clap-rs/clap/blob/master/CHANGELOG.md states that

v3.0.0-beta.4 (2021-08-14) Minimum Required Rust As of this release, clap requires rustc 1.54.0 or greater.

When I do rustup update I get:

`
❯ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: checking for self-updates

stable-x86_64-unknown-linux-gnu unchanged - rustc 1.55.0 (c8dfcfe04 2021-09-06)
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.57.0-nightly (9bb77da74 2021-09-13)
`

If I set rustup default nightly

`
❯ rustup default nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.57.0-nightly (9bb77da74 2021-09-13)
`

But when I check rustc --version
❯ rustc --version rustc 1.51.0

@mazznoer mazznoer removed the help wanted Extra attention is needed label Sep 16, 2021
@mazznoer
Copy link
Owner

mazznoer commented Sep 16, 2021

Maybe you need to update the rustup itself first. Try rustup self update and then rustup update.

@mazznoer
Copy link
Owner

I run rustup update then cargo install lolcrab and it is compiled succesfully.

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

No branches or pull requests

2 participants