Open
Description
Problem
I tried to add the following to my virtual workspace:
[lints.rust]
rust-2018-idioms = "warn"
This results in the following diagnostic:
❯ cargo check
error: failed to parse manifest at `/home/user/src/project/Cargo.toml`
Caused by:
this virtual manifest specifies a `lints` section, which is not allowed
That diagnostic doesn't give a hint about that the solution is to rename the table to workspace.lints.rust
. And googling the error did not turn up very useful results either.
Proposed Solution
❯ cargo check
error: failed to parse manifest at `/home/user/src/project/Cargo.toml`
Caused by:
this virtual manifest specifies a `lints` section, which is not allowed
Suggestion:
For workspaces, use `workspace.lints` instead
Note the added suggestion. Rustc is usually very good about giving useful hints. I assume Cargo should be able to do so too.
There is a question about what to do when you have a non-virtual workspace. It is not a feature I use myself, so I have no input on the diagnostic in that case.
Notes
No response