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
This allows users to either
- hide warnings (#14258)
- error on warnings (#8424)
`build.warnings` is setup to mirror the behavior of `RUSTFLAGS=-Dwarnings`,
including
- only errors for lint warnings and not hard warnings
- only errors for local warnings and not non-local warnings visible with
`--verbose --verbose`
- stop the build without `--keep-going`
These conditions were not originally met and also came as feedback from
rust-lang/rust which has been dogfooding this since the merge of rust-lang/rust#148332.
Things are a bit different with `RUSTFLAGS=-Awarnings`:
- Hard warnings are hidden for rustc but not cargo (rustc seems in the
wrong imo)
- In particular, we shouldn't mask the edition warning for Cargo
Script
- both hide the warning summary line (number of warnings per crate)
- both hide non-local warnings for `--verbose --verbose`
One design constraint we are operating on with this is that changing
`build.warnings` should not cause a rebuild, unlike a `RUSTFLAGS`
solution.
Closes#14802
- CI can fail due to new toolchain versions because there are limited compatibility guarantees around warnings.
228
+
Consider pinning the toolchain version with an automated job that creates a PR to upgrade the toolchain on new releases.
229
+
- Balance between exhaustiveness and turnaround time in selecting the combinations of platforms, features, and package/build-target combinations to check
230
+
- Some CI systems have direct integration for reporting lints, e.g. using [`clippy-sarif`] with GitHub
Copy file name to clipboardExpand all lines: src/doc/src/reference/unstable.md
+4-23Lines changed: 4 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,6 @@ Each new feature described below should explain how to use it.
131
131
*[gitoxide](#gitoxide) --- Use `gitoxide` instead of `git2` for a set of operations.
132
132
*[script](#script) --- Enable support for single-file `.rs` packages.
133
133
*[native-completions](#native-completions) --- Move cargo shell completions to native completions.
134
-
*[warnings](#warnings) --- controls warning behavior; options for allowing or denying warnings.
135
134
*[Package message format](#package-message-format) --- Message format for `cargo package`.
136
135
*[`fix-edition`](#fix-edition) --- A permanently unstable edition migration helper.
137
136
*[Plumbing subcommands](https://github.com/crate-ci/cargo-plumbing) --- Low, level commands that act as APIs for Cargo, like `cargo metadata`
@@ -1806,28 +1805,6 @@ When in doubt, you can discuss this in [#14520](https://github.com/rust-lang/car
1806
1805
- powershell:
1807
1806
Add `CARGO_COMPLETE=powershell cargo +nightly | Invoke-Expression` to `$PROFILE`.
1808
1807
1809
-
## warnings
1810
-
1811
-
* Original Issue: [#8424](https://github.com/rust-lang/cargo/issues/8424)
0 commit comments