about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-10 09:45:28 +0000
committerbors <bors@rust-lang.org>2021-05-10 09:45:28 +0000
commit1b30245ea1286df96d673015c4519c861e06977a (patch)
tree1cc09167eb57f4d2c2846d58c7a5e5c3e3985162 /compiler
parent2fb1dee14b3eff979f91e99ad034cfe262fc78c3 (diff)
parent2e2bba94be6d51c986536c80899e57fc3732ecd8 (diff)
downloadrust-1b30245ea1286df96d673015c4519c861e06977a.tar.gz
rust-1b30245ea1286df96d673015c4519c861e06977a.zip
Auto merge of #85053 - camsteffen:duplicate-lint, r=davidtwco
Fix duplicate unknown lint errors

Fixes rust-lang/rust-clippy#6602
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_lint/src/early.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs
index 54fcaef414f..eb2e495f73d 100644
--- a/compiler/rustc_lint/src/early.rs
+++ b/compiler/rustc_lint/src/early.rs
@@ -367,11 +367,11 @@ pub fn check_ast_crate<T: EarlyLintPass>(
                 krate,
                 EarlyLintPassObjects { lints: &mut passes[..] },
                 buffered,
-                pre_expansion,
+                false,
             );
         }
     } else {
-        for pass in &mut passes {
+        for (i, pass) in passes.iter_mut().enumerate() {
             buffered =
                 sess.prof.extra_verbose_generic_activity("run_lint", pass.name()).run(|| {
                     early_lint_crate(
@@ -380,7 +380,7 @@ pub fn check_ast_crate<T: EarlyLintPass>(
                         krate,
                         EarlyLintPassObjects { lints: slice::from_mut(pass) },
                         buffered,
-                        pre_expansion,
+                        pre_expansion && i == 0,
                     )
                 });
         }