Skip to content

Commit 284982d

Browse files
committed
Address review nitpicks.
1 parent 0b2436f commit 284982d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustc_lint/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,10 @@ pub trait LintContext: Sized {
474474
fn sess(&self) -> &Session;
475475
fn lints(&self) -> &LintStore;
476476

477-
fn lookup_with_diagnostics<S: Into<MultiSpan>>(
477+
fn lookup_with_diagnostics(
478478
&self,
479479
lint: &'static Lint,
480-
span: Option<S>,
480+
span: Option<impl Into<MultiSpan>>,
481481
decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>),
482482
diagnostic: BuiltinLintDiagnostics,
483483
) {

src/librustc_lint/early.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ impl<'a, T: EarlyLintPass> EarlyContextAndPass<'a, T> {
4141
span,
4242
msg,
4343
node_id: _,
44-
lint_id: _,
44+
lint_id,
4545
diagnostic,
4646
} = early_lint;
4747
self.context.lookup_with_diagnostics(
48-
early_lint.lint_id.lint,
48+
lint_id.lint,
4949
Some(span),
5050
|lint| lint.build(&msg).emit(),
5151
diagnostic,

0 commit comments

Comments
 (0)