summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-05-22 16:46:05 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2024-05-23 04:08:35 +0200
commit06bc4fc67145e3a7be9b5a2cf2b5968cef36e587 (patch)
treee1a7e22564518a44d73943359309ad3c460fe67a /src/librustdoc/html
parent366ef954073bdaebe83e6619430ae0e8d17b9850 (diff)
downloadrust-06bc4fc67145e3a7be9b5a2cf2b5968cef36e587.tar.gz
rust-06bc4fc67145e3a7be9b5a2cf2b5968cef36e587.zip
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
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/markdown.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index 5c5651f3ef0..362f9021671 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -834,8 +834,9 @@ impl<'tcx> ExtraInfo<'tcx> {
                 crate::lint::INVALID_CODEBLOCK_ATTRIBUTES,
                 self.tcx.local_def_id_to_hir_id(def_id),
                 self.sp,
-                msg,
-                |_| {},
+                |lint| {
+                    lint.primary_message(msg);
+                },
             );
         }
     }
@@ -850,8 +851,10 @@ impl<'tcx> ExtraInfo<'tcx> {
                 crate::lint::INVALID_CODEBLOCK_ATTRIBUTES,
                 self.tcx.local_def_id_to_hir_id(def_id),
                 self.sp,
-                msg,
-                f,
+                |lint| {
+                    lint.primary_message(msg);
+                    f(lint);
+                },
             );
         }
     }