From 284982df6047ad8a259a3cb0698706ccdfd20946 Mon Sep 17 00:00:00 2001 From: jumbatm Date: Thu, 6 Feb 2020 01:28:23 +1000 Subject: [PATCH] Address review nitpicks. --- src/librustc_lint/context.rs | 4 ++-- src/librustc_lint/early.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_lint/context.rs b/src/librustc_lint/context.rs index 232b56c88f2..f3cbd3f1c9e 100644 --- a/src/librustc_lint/context.rs +++ b/src/librustc_lint/context.rs @@ -474,10 +474,10 @@ pub trait LintContext: Sized { fn sess(&self) -> &Session; fn lints(&self) -> &LintStore; - fn lookup_with_diagnostics>( + fn lookup_with_diagnostics( &self, lint: &'static Lint, - span: Option, + span: Option>, decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>), diagnostic: BuiltinLintDiagnostics, ) { diff --git a/src/librustc_lint/early.rs b/src/librustc_lint/early.rs index a636e7540fb..c3511590673 100644 --- a/src/librustc_lint/early.rs +++ b/src/librustc_lint/early.rs @@ -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,