summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis
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 /compiler/rustc_pattern_analysis
parent1aeb99d248e1b0069110cb03c6f1dcc7b36fd7f3 (diff)
downloadrust-8121958fda43759fa94e3f74f7cdbb595ddcc0e5.tar.gz
rust-8121958fda43759fa94e3f74f7cdbb595ddcc0e5.zip
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 'compiler/rustc_pattern_analysis')
-rw-r--r--compiler/rustc_pattern_analysis/src/lib.rs1
-rw-r--r--compiler/rustc_pattern_analysis/tests/complexity.rs2
-rw-r--r--compiler/rustc_pattern_analysis/tests/exhaustiveness.rs2
-rw-r--r--compiler/rustc_pattern_analysis/tests/intersection.rs2
4 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lib.rs b/compiler/rustc_pattern_analysis/src/lib.rs
index eeea724a29b..176dcbf6da4 100644
--- a/compiler/rustc_pattern_analysis/src/lib.rs
+++ b/compiler/rustc_pattern_analysis/src/lib.rs
@@ -5,6 +5,7 @@
 // tidy-alphabetical-start
 #![allow(rustc::diagnostic_outside_of_impl)]
 #![allow(rustc::untranslatable_diagnostic)]
+#![allow(unused_crate_dependencies)]
 #![cfg_attr(feature = "rustc", feature(let_chains))]
 // tidy-alphabetical-end
 
diff --git a/compiler/rustc_pattern_analysis/tests/complexity.rs b/compiler/rustc_pattern_analysis/tests/complexity.rs
index abd1ec24d93..93aecafe48d 100644
--- a/compiler/rustc_pattern_analysis/tests/complexity.rs
+++ b/compiler/rustc_pattern_analysis/tests/complexity.rs
@@ -1,5 +1,7 @@
 //! Test the pattern complexity limit.
 
+#![allow(unused_crate_dependencies)]
+
 use common::*;
 use rustc_pattern_analysis::MatchArm;
 use rustc_pattern_analysis::pat::DeconstructedPat;
diff --git a/compiler/rustc_pattern_analysis/tests/exhaustiveness.rs b/compiler/rustc_pattern_analysis/tests/exhaustiveness.rs
index 61ce0fd11e7..3b8f346ef19 100644
--- a/compiler/rustc_pattern_analysis/tests/exhaustiveness.rs
+++ b/compiler/rustc_pattern_analysis/tests/exhaustiveness.rs
@@ -1,5 +1,7 @@
 //! Test exhaustiveness checking.
 
+#![allow(unused_crate_dependencies)]
+
 use common::*;
 use rustc_pattern_analysis::MatchArm;
 use rustc_pattern_analysis::pat::{DeconstructedPat, WitnessPat};
diff --git a/compiler/rustc_pattern_analysis/tests/intersection.rs b/compiler/rustc_pattern_analysis/tests/intersection.rs
index 45674338efd..8e6f84dcbc8 100644
--- a/compiler/rustc_pattern_analysis/tests/intersection.rs
+++ b/compiler/rustc_pattern_analysis/tests/intersection.rs
@@ -1,5 +1,7 @@
 //! Test the computation of arm intersections.
 
+#![allow(unused_crate_dependencies)]
+
 use common::*;
 use rustc_pattern_analysis::MatchArm;
 use rustc_pattern_analysis::pat::DeconstructedPat;