1
Fork 0

Do not filter empty passes & Make CTFE Clippy into lintless pass

This commit is contained in:
blyxyas 2024-11-05 13:40:36 +01:00
parent 27e38f8fc7
commit 2eac3c0e53
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();