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.
This commit is contained in:
@@ -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, || {
|
||||
//! /* ... */
|
||||
//! });
|
||||
//! /* ... */
|
||||
//! }
|
||||
//! ```
|
||||
//!
|
||||
|
||||
Reference in New Issue
Block a user