From 20431706a863f92cb37dc512fef6e48d192aaf2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_lint/src/early.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_lint/src/early.rs') diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs index 96ecd79a6..aee870dd2 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, ); } @@ -59,6 +58,7 @@ impl<'a, T: EarlyLintPass> EarlyContextAndPass<'a, T> { F: FnOnce(&mut Self), { let is_crate_node = id == ast::CRATE_NODE_ID; + debug!(?id); let push = self.context.builder.push(attrs, is_crate_node, None); self.check_id(id); @@ -409,7 +409,7 @@ pub fn check_ast_node<'a>( if sess.opts.unstable_opts.no_interleave_lints { for (i, pass) in passes.iter_mut().enumerate() { buffered = - sess.prof.extra_verbose_generic_activity("run_lint", pass.name()).run(|| { + sess.prof.verbose_generic_activity_with_arg("run_lint", pass.name()).run(|| { early_lint_node( sess, !pre_expansion && i == 0, -- cgit v1.2.3