]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/early.rs
Refactor rustc lint API
[rust.git] / compiler / rustc_lint / src / early.rs
index 96ecd79a69cfb3603cae46f45a7c06064ab331a8..18d30e1435be8f74937e544d3ccfbe050ea2ea47 100644 (file)
@@ -43,9 +43,8 @@ fn check_id(&mut self, id: ast::NodeId) {
             self.context.lookup_with_diagnostics(
                 lint_id.lint,
                 Some(span),
-                |lint| {
-                    lint.build(msg).emit();
-                },
+                msg,
+                |lint| lint,
                 diagnostic,
             );
         }