]> git.lizzy.rs Git - rust.git/commit
Remove `{Early,Late}LintPassObjects`.
authorNicholas Nethercote <n.nethercote@gmail.com>
Mon, 5 Dec 2022 08:31:36 +0000 (19:31 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Mon, 5 Dec 2022 08:50:10 +0000 (19:50 +1100)
commit8980d9a76d68f1b75f104c955aaafb0b0d0d58bc
treecf10c577ec9684239989be858e0a8a1a4c7058b7
parente72ea1dc376e9c302c68faefafd967a8a7ef255a
Remove `{Early,Late}LintPassObjects`.

`EarlyContextAndPass` wraps a single early lint pass. We aggregate
multiple passes into that single pass by using `EarlyLintPassObjects`.

This commit removes `EarlyLintPassObjects` by changing
`EarlyContextAndPass` into `EarlyContextAndPasses`. I.e. it just removes
a level of indirection. This makes the code simpler and slightly faster.

The commit does likewise for late lints.
compiler/rustc_lint/src/early.rs
compiler/rustc_lint/src/late.rs