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:
commit
560248f4f7
2 changed files with 9 additions and 19 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue