about summary refs log tree commit diff
path: root/clippy_dev/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-02 10:42:12 +0000
committerbors <bors@rust-lang.org>2022-04-02 10:42:12 +0000
commit85b88be2a4fc46fc27d51d4fb273d65818ee63d7 (patch)
treee3f28fc56bb67200f7904895f8839ef218cf0765 /clippy_dev/src/lib.rs
parentbaaddf2b84008c6128b928472660bafa56e41b37 (diff)
parentae5af0cd1a3f59cc3537ade7dfba06989969b918 (diff)
Auto merge of #8605 - Jarcho:remove-deps, r=xFrednet
Remove deps

This remove both `regex` and `cargo_metadata` as dependencies making `clippy_dev` compile ~3x faster (~46s -> ~16s locally). `cargo_metadata` was used to extract the `version` field from `Cargo.toml`, which is done trivially without that. `regex` was used to parse `define_clippy_lint` in `update_lints` which is now done using `rustc_lexer`. This isn't any simpler, but it compiles ~15s faster and runs ~3x faster (~2.1s -> ~0.7s locally).

The next biggest offenders to compile times are `clap` and `winapi` on windows. `clap` could be removed, but re-implementing enough is probably more work than it's worth. `winapi` is used by `opener` and `walkdir` so it's stuck there.

changelog: none
Diffstat (limited to 'clippy_dev/src/lib.rs')
-rw-r--r--clippy_dev/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs
index 59fde447547..414b403827d 100644
--- a/clippy_dev/src/lib.rs
+++ b/clippy_dev/src/lib.rs
@@ -1,8 +1,12 @@
+#![feature(let_else)]
 #![feature(once_cell)]
+#![feature(rustc_private)]
 #![cfg_attr(feature = "deny-warnings", deny(warnings))]
 // warn on lints, that are included in `rust-lang/rust`s bootstrap
 #![warn(rust_2018_idioms, unused_lifetimes)]
 
+extern crate rustc_lexer;
+
 use std::path::PathBuf;
 
 pub mod bless;