Skip to content

Commit 4a737c4

Browse files
committed
add explicit note that this change does not effect existing -Dwarnings usage.
1 parent 14bd7f2 commit 4a737c4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

text/0000-cargo-report-future-incompat.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,19 @@ As noted above, we want to continue to suppress normal lint checks for
306306
upstream dependencies. Therefore, Cargo will continue to pass
307307
`--cap-lints=allow` for non-path upstream dependencies.
308308

309+
At the same time, we want to minimize disruption to existing users of Rust.
310+
Therefore, the behavior of flags that directly interact with lints, like
311+
`-Dwarnings`, will remain unchanged by this RFC.
312+
313+
For example, in our running example of `unwary`:
314+
* running `cargo rustc -- -Dwarnings` will behave the same as today
315+
(the lints in the downstream `brash` dependency will be capped
316+
and their warnings hidden), and
317+
* running `RUSTFLAGS=-Dwarnings` will also behave the same as today
318+
(the `rustc` invocation on the downstream `brash` depedency
319+
will be invoked with `-Dwarnings` and thus the build of the `brash`
320+
dependency will fail).
321+
309322
However, the Rust compiler's behavior will change slightly. Even when
310323
`--cap-lints=allow` is turned on, we need Cargo to know when a
311324
future-incompatibilty lint is triggered.

0 commit comments

Comments
 (0)