diff options
| author | jumbatm <jumbatm@gmail.com> | 2020-02-06 01:28:23 +1000 |
|---|---|---|
| committer | jumbatm <jumbatm@gmail.com> | 2020-02-11 19:50:26 +1000 |
| commit | 284982df6047ad8a259a3cb0698706ccdfd20946 (patch) | |
| tree | 546a047e6347f8625c75f9e39c864daa8fe91538 /src | |
| parent | 0b2436f3a466ff077861665197cf35059c811f48 (diff) | |
| download | rust-284982df6047ad8a259a3cb0698706ccdfd20946.tar.gz rust-284982df6047ad8a259a3cb0698706ccdfd20946.zip | |
Address review nitpicks.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_lint/context.rs | 4 | ||||
| -rw-r--r-- | 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<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, ) { 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, |
