Address review nitpicks.
This commit is contained in:
parent
0b2436f3a4
commit
284982df60
src/librustc_lint
@ -474,10 +474,10 @@ pub trait LintContext: Sized {
|
||||
fn sess(&self) -> &Session;
|
||||
fn lints(&self) -> &LintStore;
|
||||
|
||||
fn lookup_with_diagnostics<S: Into<MultiSpan>>(
|
||||
fn lookup_with_diagnostics(
|
||||
&self,
|
||||
lint: &'static Lint,
|
||||
span: Option<S>,
|
||||
span: Option<impl Into<MultiSpan>>,
|
||||
decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>),
|
||||
diagnostic: BuiltinLintDiagnostics,
|
||||
) {
|
||||
|
@ -41,11 +41,11 @@ impl<'a, T: EarlyLintPass> EarlyContextAndPass<'a, T> {
|
||||
span,
|
||||
msg,
|
||||
node_id: _,
|
||||
lint_id: _,
|
||||
lint_id,
|
||||
diagnostic,
|
||||
} = early_lint;
|
||||
self.context.lookup_with_diagnostics(
|
||||
early_lint.lint_id.lint,
|
||||
lint_id.lint,
|
||||
Some(span),
|
||||
|lint| lint.build(&msg).emit(),
|
||||
diagnostic,
|
||||
|
Loading…
Reference in New Issue
Block a user