Do not filter empty lint passes & re-do CTFE pass#132637
Do not filter empty lint passes & re-do CTFE pass#132637bors merged 1 commit intorust-lang:masterfrom
Conversation
|
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
compiler/rustc_lint/src/late.rs
Outdated
| // Lintless passes are always in | ||
| lints.is_empty() | ||
| || !lints.iter().all(|lint| lints_that_dont_need_to_run.contains(&LintId::of(lint))) |
There was a problem hiding this comment.
This condition is quite hard to read now. I suggest to store the second part in a variable:
| // Lintless passes are always in | |
| lints.is_empty() | |
| || !lints.iter().all(|lint| lints_that_dont_need_to_run.contains(&LintId::of(lint))) | |
| let all_lints_allowed = lints.iter().all(|lint| lints_that_dont_need_to_run.contains(&LintId::of(lint))); | |
| // `LintPass`es without lints always run | |
| lints.is_empty() || !all_lints_allowed |
(might need formatting)
There was a problem hiding this comment.
Philipp wait because this PR doesn't handle the whole second part of your comment. As making a sync is a hard task, I assumed you wouldn't want to redo it. I'm currently testing making CTFE a lintless pass.
There was a problem hiding this comment.
Yeah, I can only do the sync after this is merged and got into nightly.
This was just a general note on this. I still like the variable name over the comment. But just a NIT, so feel free to keep either.
e34695c to
2eac3c0
Compare
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
|
I tested the |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#132259 (rustc_codegen_llvm: Add a new 'pc' option to branch-protection) - rust-lang#132409 (CI: switch 7 linux jobs to free runners) - rust-lang#132498 (Suggest fixing typos and let bindings at the same time) - rust-lang#132524 (chore(style): sync submodule exclusion list between tidy and rustfmt) - rust-lang#132567 (Properly suggest `E::assoc` when we encounter `E::Variant::assoc`) - rust-lang#132571 (add const_eval_select macro to reduce redundancy) - rust-lang#132637 (Do not filter empty lint passes & re-do CTFE pass) - rust-lang#132642 (Add documentation on `ast::Attribute`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#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 rust-lang#125116 broke that behaviour by filtering them out. This PR ensures that lintless passes are not filtered out.
Do not filter empty lint passes & re-do CTFE pass Some structs implement `LintPass` without having a `Lint` associated with them rust-lang#125116 broke that behaviour by filtering them out. This PR ensures that lintless passes are not filtered out.
Some structs implement
LintPasswithout having aLintassociated with them #125116 broke that behaviour by filtering them out. This PR ensures that lintless passes are not filtered out.