about summary refs log tree commit diff
path: root/compiler/rustc_log
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_log
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_log')
-rw-r--r--compiler/rustc_log/Cargo.toml5
-rw-r--r--compiler/rustc_log/src/lib.rs7
2 files changed, 1 insertions, 11 deletions
diff --git a/compiler/rustc_log/Cargo.toml b/compiler/rustc_log/Cargo.toml
index 30f6e9ba805..c673d51a1d4 100644
--- a/compiler/rustc_log/Cargo.toml
+++ b/compiler/rustc_log/Cargo.toml
@@ -11,11 +11,6 @@ tracing-subscriber = { version = "0.3.3", default-features = false, features = [
 tracing-tree = "0.3.1"
 # tidy-alphabetical-end
 
-[dev-dependencies]
-# tidy-alphabetical-start
-rustc_span = { path = "../rustc_span" }
-# tidy-alphabetical-end
-
 [features]
 # tidy-alphabetical-start
 max_level_info = ['tracing/max_level_info']
diff --git a/compiler/rustc_log/src/lib.rs b/compiler/rustc_log/src/lib.rs
index d0ef82f4a6c..49dd388f14c 100644
--- a/compiler/rustc_log/src/lib.rs
+++ b/compiler/rustc_log/src/lib.rs
@@ -9,17 +9,12 @@
 //! [dependencies]
 //! rustc_ast = { path = "../rust/compiler/rustc_ast" }
 //! rustc_log = { path = "../rust/compiler/rustc_log" }
-//! rustc_span = { path = "../rust/compiler/rustc_span" }
 //! ```
 //!
 //! ```
 //! fn main() {
 //!     rustc_log::init_logger(rustc_log::LoggerConfig::from_env("LOG")).unwrap();
-//!
-//!     let edition = rustc_span::edition::Edition::Edition2021;
-//!     rustc_span::create_session_globals_then(edition, None, || {
-//!         /* ... */
-//!     });
+//!     /* ... */
 //! }
 //! ```
 //!