1
Fork 0

Rollup merge of #132637 - blyxyas:lint-less-passes, r=flip1995

Do not filter empty lint passes & re-do CTFE pass

Some structs implement `LintPass` without having a `Lint` associated with them #125116 broke that behaviour by filtering them out. This PR ensures that lintless passes are not filtered out.
This commit is contained in:
Matthias Krüger 2024-11-05 20:10:53 +01:00 committed by GitHub
commit 560248f4f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 19 deletions

View file

@ -422,6 +422,9 @@ fn late_lint_crate<'tcx>(tcx: TyCtxt<'tcx>) {
.into_iter()
.filter(|pass| {
let lints = (**pass).get_lints();
// Lintless passes are always in
lints.is_empty() ||
// If the pass doesn't have a single needed lint, omit it
!lints.iter().all(|lint| lints_that_dont_need_to_run.contains(&LintId::of(lint)))
})
.collect();