Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 06bc4fc

Browse files
committedMay 23, 2024
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
1 parent 366ef95 commit 06bc4fc

File tree

44 files changed

+430
-488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+430
-488
lines changed
 

‎compiler/rustc_codegen_ssa/src/codegen_attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,8 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
564564
lint::builtin::INLINE_NO_SANITIZE,
565565
hir_id,
566566
no_sanitize_span,
567-
"`no_sanitize` will have no effect after inlining",
568567
|lint| {
568+
lint.primary_message("`no_sanitize` will have no effect after inlining");
569569
lint.span_note(inline_span, "inlining requested here");
570570
},
571571
)

‎compiler/rustc_errors/src/diagnostic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@ pub trait SubdiagMessageOp<G: EmissionGuarantee> =
200200
pub trait LintDiagnostic<'a, G: EmissionGuarantee> {
201201
/// Decorate and emit a lint.
202202
fn decorate_lint<'b>(self, diag: &'b mut Diag<'a, G>);
203-
204-
fn msg(&self) -> DiagMessage;
205203
}
206204

207205
#[derive(Clone, Debug, Encodable, Decodable)]

0 commit comments

Comments
 (0)