From 06bc4fc67145e3a7be9b5a2cf2b5968cef36e587 Mon Sep 17 00:00:00 2001 From: León Orell Valerian Liehr Date: Wed, 22 May 2024 16:46:05 +0200 Subject: Remove `LintDiagnostic::msg` * instead simply set the primary message inside the lint decorator functions * it used to be this way before [#]101986 which introduced `msg` to prevent good path delayed bugs (which no longer exist) from firing under certain circumstances when lints were suppressed / silenced * this is no longer necessary for various reasons I presume * it shaves off complexity and makes further changes easier to implement --- compiler/rustc_pattern_analysis/src/lints.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'compiler/rustc_pattern_analysis') diff --git a/compiler/rustc_pattern_analysis/src/lints.rs b/compiler/rustc_pattern_analysis/src/lints.rs index 1d10c9df4ab..892aacd7ac5 100644 --- a/compiler/rustc_pattern_analysis/src/lints.rs +++ b/compiler/rustc_pattern_analysis/src/lints.rs @@ -99,7 +99,6 @@ pub(crate) fn lint_nonexhaustive_missing_variants<'p, 'tcx>( use rustc_errors::LintDiagnostic; let mut err = rcx.tcx.dcx().struct_span_warn(arm.pat.data().span, ""); - err.primary_message(decorator.msg()); decorator.decorate_lint(&mut err); err.emit(); } -- cgit 1.4.1-3-g733a5