about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-03-03 18:59:30 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-03-20 08:59:43 +1100
commit8121958fda43759fa94e3f74f7cdbb595ddcc0e5 (patch)
treec20bf9e69eff3c798349dd05b42ee8080af954f4 /src/bootstrap
parent1aeb99d248e1b0069110cb03c6f1dcc7b36fd7f3 (diff)
Use `-Wunused_crate_dependencies` for compiler crates.
It's very useful. There are some false positives involving integration
tests in `rustc_pattern_analysis` and `rustc_serialize`. There is also a
false positive involving `rustc_driver_impl`'s
`rustc_randomized_layouts` feature. And I removed a `rustc_span` mention
in a doc comment in `rustc_log` because it wasn't integral to the
comment but caused a dev-dependency.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/builder/cargo.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index efb1b8b25b7..a96ccdd12c2 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -1073,6 +1073,7 @@ impl Builder<'_> {
             lint_flags.push("-Wkeyword_idents_2024");
             lint_flags.push("-Wunreachable_pub");
             lint_flags.push("-Wunsafe_op_in_unsafe_fn");
+            lint_flags.push("-Wunused_crate_dependencies");
         }
 
         // This does not use RUSTFLAGS for two reasons.