]> git.lizzy.rs Git - rust.git/commit
Reinstate `{Early,Late}LintPassObjects`.
authorNicholas Nethercote <n.nethercote@gmail.com>
Fri, 9 Dec 2022 01:27:43 +0000 (12:27 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Sun, 11 Dec 2022 21:59:27 +0000 (08:59 +1100)
commit3c53781800e50b2abc72c5b1542400eff48a8126
tree410b33806a1fd57ba771bd3103899a214b415386
parent2b05f841155c06b61fceb390c3cc3c2c974306a0
Reinstate `{Early,Late}LintPassObjects`.

I removed these in #105291, and subsequently learned they are necessary
for performance.

This commit reinstates them with the new and more descriptive names
`RuntimeCombined{Early,Late}LintPass`, similar to the existing passes
like `BuiltinCombinedEarlyLintPass`. It also adds some comments,
particularly emphasising how we have ways to combine passes at both
compile-time and runtime. And it moves some comments around.
compiler/rustc_lint/src/early.rs
compiler/rustc_lint/src/late.rs
compiler/rustc_lint/src/lib.rs
compiler/rustc_lint/src/passes.rs