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

Can`t build on linux gnu #3299

Closed
2 tasks done
nrot opened this issue Jan 16, 2022 · 1 comment
Closed
2 tasks done

Can`t build on linux gnu #3299

nrot opened this issue Jan 16, 2022 · 1 comment
Labels
C-bug Category: Updating dependencies

Comments

@nrot
Copy link

nrot commented Jan 16, 2022

Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Rust Version

rustc 1.53.0

Clap Version

3.0.7

Minimal reproducible code

use clap::{App, arg};

fn main() {
    println!("Hello, world!");
    let args = App::new("").args(&[
        arg!(<FILE> "file to show"),
        arg!(--filter [filter] "filter type: Nearest,Triangle,CatmullRom,Gaussian,Lanczos3"),
        arg!(-s --"scale_font" [scale_font] "scale of font to correct image"),
    ]).get_matches();
    println!("File: {:?}", args.value_of("FILE"))
}

Steps to reproduce the bug with the above code

On wsl inside Windows 10.

uname -a
Linux HOME-PC 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
cargo build

Actual Behaviour

cargo build
Compiling libc v0.2.112
Compiling memchr v2.4.1
Compiling indexmap v1.8.0
Compiling os_str_bytes v6.0.0
Compiling atty v0.2.14
Compiling clap v3.0.7
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/nrot/.cargo/registry/src/github.51.al-1ecc6299db9ec823/clap-3.0.7/src/lib.rs:8:39
|
8 | #![cfg_attr(feature = "derive", doc = include_str!("../README.md"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #78835 rust-lang/rust#78835 for more information

error: aborting due to previous error

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

To learn more, run the command again with --verbose.

Expected Behaviour

The build app

Additional Context

rustup show

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

installed toolchains

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

active toolchain

stable-x86_64-unknown-linux-gnu (default)
rustc 1.58.0 (02072b482 2022-01-11

Debug Output

error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/nrot/.cargo/registry/src/github.51.al-1ecc6299db9ec823/clap_derive-3.0.6/src/lib.rs:16:10
|
16 | #![doc = include_str!("../README.md")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #78835 rust-lang/rust#78835 for more information

error: aborting due to previous error

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

To learn more, run the command again with --verbose.

@nrot nrot added the C-bug Category: Updating dependencies label Jan 16, 2022
@epage
Copy link
Member

epage commented Jan 17, 2022

Our documented minimum-supported Rust version (or MSRV) is 1.54.0 which is when "arbitrary expressions in key-value attributes" was stabilized.

I'd recommend upgrading Rust. If there is a problem with doing so, I'd recommend continuing this discussion on #3267.

@epage epage closed this as completed Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Updating dependencies
Projects
None yet
Development

No branches or pull requests

2 participants