From c3fdf748856fa220dc251647808db8535ac0bba2 Mon Sep 17 00:00:00 2001 From: David Wood Date: Mon, 11 Jul 2022 16:29:24 +0100 Subject: errors: lint on `LintDiagnosticBuilder::build` Apply the `#[rustc_lint_diagnostics]` attribute to `LintDiagnosticBuilder::build` so that diagnostic migration lints will trigger for it. Signed-off-by: David Wood --- compiler/rustc_errors/src/diagnostic_builder.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_errors') diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index 99ac6a3546e..9e68ee282e6 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -595,6 +595,7 @@ macro_rules! error_code { pub struct LintDiagnosticBuilder<'a, G: EmissionGuarantee>(DiagnosticBuilder<'a, G>); impl<'a, G: EmissionGuarantee> LintDiagnosticBuilder<'a, G> { + #[rustc_lint_diagnostics] /// Return the inner `DiagnosticBuilder`, first setting the primary message to `msg`. pub fn build(mut self, msg: impl Into) -> DiagnosticBuilder<'a, G> { self.0.set_primary_message(msg); -- cgit 1.4.1-3-g733a5