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

Invalid value for --edition #4922

Closed
Luro02 opened this issue Jul 26, 2021 · 2 comments
Closed

Invalid value for --edition #4922

Luro02 opened this issue Jul 26, 2021 · 2 comments

Comments

@Luro02
Copy link

Luro02 commented Jul 26, 2021

I recently upgraded my project to rust 2021 edition, but rustfmt is no longer working (both on computer and ci with the latest nightly).

To reproduce:

> git clone https://github.com/Luro02/array-map
> cd array-map
> cargo fmt --all -- --check
Invalid value for `--edition`

This issue is not only limited to this project, one can also reproduce it by running cargo new help and changing the Cargo.toml to:

+ cargo-features = ["edition2021"]
+
[package]
name = "help"
version = "0.1.0"
+ edition = "2021"
- edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

This may be related to #4916

@Luro02
Copy link
Author

Luro02 commented Jul 26, 2021

Even simpler reproduction:

> rustfmt --edition 2021
Invalid value for `--edition`

@calebcartwright
Copy link
Member

Thanks for reaching out but closing as a duplicate of an issue already covered by #4847.

It's been fixed in source but not yet released. Will be available in the following nightly after rust-lang/rust#87468 lands

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

No branches or pull requests

2 participants