You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, you can configure lints through
#[<level>(<lint>)] or #![<level>(<lint>)], like #[forbid(unsafe)]
But this doesn't scale up with additional targets (benches, examples, tests) or workspaces
On the command line, like cargo clippy -- --forbid unsafe
This puts the burden on the caller
Through RUSTFLAGS, like RUSTFLAGS=--forbid=unsafe cargo clippy
This puts the burden on the caller
In .cargo/config.toml's target.*.rustflags
This couples you to the running in specific directories and not running in the right directory causes rebuilds
The cargo team has previously stated that [they would like to see package-specific config moved to manifests](https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336/14?u=epage)
So to enable them for the workspace we could put them in RUSTFLAGS for all targets in a .cargo/config.toml.
We should fix this when [lints] is added in the stable we target.
The text was updated successfully, but these errors were encountered:
From Rust 1.74 and onwards, this section enables opt-in lints for crates
of this workspace. Read more information at https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html
For a crate to opt-in, it needs to set
[lints]
workspace = true
In its Cargo.toml
Closesrust-vmm#518
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Quoting #514 (comment):
We should fix this when
[lints]
is added in thestable
we target.The text was updated successfully, but these errors were encountered: