about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/passes.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-26 02:31:12 +0000
committerbors <bors@rust-lang.org>2025-07-26 02:31:12 +0000
commitf32b23204a0efe2fe8383ed4be1a30b56c1bbf94 (patch)
tree186b6bb0854e7cb8050ed919247c61fe4e06316e /compiler/rustc_lint/src/passes.rs
parent0dd07bd2165db70ffbe0b903635de26ca630bf20 (diff)
parent6083850ba8544aef61fc54809174a6d83f2f00ec (diff)
downloadrust-f32b23204a0efe2fe8383ed4be1a30b56c1bbf94.tar.gz
rust-f32b23204a0efe2fe8383ed4be1a30b56c1bbf94.zip
Auto merge of #139597 - Kobzol:lint-skip, r=BoxyUwU
Do not run per-module late lints if they can be all skipped

We run ~70 late lints for all dependencies even if they use `--cap-lints=allow`, which seems wasteful. It looks like these lints are super fast (unlike early lints), but still.

r? `@ghost`
Diffstat (limited to 'compiler/rustc_lint/src/passes.rs')
-rw-r--r--compiler/rustc_lint/src/passes.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/passes.rs b/compiler/rustc_lint/src/passes.rs
index affea1b80ec..191eb721b34 100644
--- a/compiler/rustc_lint/src/passes.rs
+++ b/compiler/rustc_lint/src/passes.rs
@@ -92,7 +92,7 @@ macro_rules! expand_combined_late_lint_pass_methods {
 /// Combines multiple lints passes into a single lint pass, at compile time,
 /// for maximum speed. Each `check_foo` method in `$methods` within this pass
 /// simply calls `check_foo` once per `$pass`. Compare with
-/// `LateLintPassObjects`, which is similar, but combines lint passes at
+/// `RuntimeCombinedLateLintPass`, which is similar, but combines lint passes at
 /// runtime.
 #[macro_export]
 macro_rules! declare_combined_late_lint_pass {
@@ -123,10 +123,10 @@ macro_rules! declare_combined_late_lint_pass {
         #[allow(rustc::lint_pass_impl_without_macro)]
         impl $crate::LintPass for $name {
             fn name(&self) -> &'static str {
-                panic!()
+                stringify!($name)
             }
             fn get_lints(&self) -> LintVec {
-                panic!()
+                $name::get_lints()
             }
         }
     )