Skip to content

Commit a642d85

Browse files
committed
Change to a multi-trait approach
[breaking-change] for lint authors You must now implement LateLintPass or EarlyLintPass as well as LintPass and use either register_late_lint_pass or register_early_lint_pass, rather than register_lint_pass.
1 parent c1084a3 commit a642d85

File tree

11 files changed

+266
-150
lines changed

11 files changed

+266
-150
lines changed

src/librustc/lint/builtin.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! compiler code, rather than using their own custom pass. Those
1515
//! lints are all available in `rustc_lint::builtin`.
1616
17-
use lint::{LintPass, LintArray};
17+
use lint::{LintPass, LateLintPass, LintArray};
1818

1919
declare_lint! {
2020
pub UNUSED_IMPORTS,
@@ -138,3 +138,5 @@ impl LintPass for HardwiredLints {
138138
)
139139
}
140140
}
141+
142+
impl LateLintPass for HardwiredLints {}

0 commit comments

Comments
 (0)