-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cargo dignostic for misplaced cargo-features = ["edition2021"]
could be better
#9717
Comments
On a related note, I was very impressed that there is a diagnostic at all for this which is so helpful: I immediately knew what to do, despite the minor issues above! |
Thanks for the report! Transferred to rust-lang/cargo. |
@rustbot claim |
How did you solve this issue? This is my original Cargo.toml: `[package] See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html[dependencies] And I'm getting the same error as you:
Caused by: No matter where I add the cargo-features = ["edition2021"] I get the same error, and if I add it on top how it states, I get:
Caused by: Caused by: Caused by: consider adding |
I followed the process at https://blog.rust-lang.org/2021/07/21/Rust-2021-public-testing.html#public-testing-period and wish to report a quality issue with a diagnostic from Cargo. The issue template linked didn't have one for cargo diagnostics, so I'm using the rustc diagnostic template.
Given the following code:
The current output is:
Ideally the output should look like:
The error is message is grammatically two sentences, which are comma spliced. They should have a period or a colon instead. Additionally the trailing period is missing, and https://doc.rust-lang.org/cargo/reference/manifest.html refers to the units within a toml file as "sections" not tables.
$ rustc +nightly --version --verbose
rustc 1.55.0-nightly (027187094 2021-07-22)
binary: rustc
commit-hash: 027187094ee05011d6602f5742f550851ccc7fd6
commit-date: 2021-07-22
host: x86_64-unknown-linux-gnu
release: 1.55.0-nightly
LLVM version: 12.0.1
The text was updated successfully, but these errors were encountered: