summary refs log tree commit diff
path: root/compiler/rustc_lint/src/early.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src/early.rs')
-rw-r--r--compiler/rustc_lint/src/early.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs
index 96ecd79a69c..18d30e1435b 100644
--- a/compiler/rustc_lint/src/early.rs
+++ b/compiler/rustc_lint/src/early.rs
@@ -43,9 +43,8 @@ impl<'a, T: EarlyLintPass> EarlyContextAndPass<'a, T> {
             self.context.lookup_with_diagnostics(
                 lint_id.lint,
                 Some(span),
-                |lint| {
-                    lint.build(msg).emit();
-                },
+                msg,
+                |lint| lint,
                 diagnostic,
             );
         }