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.
This commit is contained in:
parent
2b05f84115
commit
3c53781800
4 changed files with 106 additions and 40 deletions
|
@ -127,7 +127,6 @@ fn lint_mod(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
|
|||
late::late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new());
|
||||
}
|
||||
|
||||
// See the comment on `BuiltinCombinedEarlyLintPass`, which is similar.
|
||||
early_lint_methods!(
|
||||
declare_combined_early_lint_pass,
|
||||
[
|
||||
|
@ -138,9 +137,6 @@ early_lint_methods!(
|
|||
]
|
||||
);
|
||||
|
||||
// Declare `BuiltinCombinedEarlyLintPass`, a lint pass that combines multiple
|
||||
// lint passes into a single pass for maximum speed. Each `check_foo` method
|
||||
// within this pass simply calls `check_foo` once per listed lint.
|
||||
early_lint_methods!(
|
||||
declare_combined_early_lint_pass,
|
||||
[
|
||||
|
@ -168,7 +164,6 @@ early_lint_methods!(
|
|||
|
||||
// FIXME: Make a separate lint type which does not require typeck tables.
|
||||
|
||||
// See the comment on `BuiltinCombinedEarlyLintPass`, which is similar.
|
||||
late_lint_methods!(
|
||||
declare_combined_late_lint_pass,
|
||||
[
|
||||
|
@ -188,7 +183,6 @@ late_lint_methods!(
|
|||
]
|
||||
);
|
||||
|
||||
// See the comment on `BuiltinCombinedEarlyLintPass`, which is similar.
|
||||
late_lint_methods!(
|
||||
declare_combined_late_lint_pass,
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue