about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-31 15:01:22 +0000
committerbors <bors@rust-lang.org>2024-01-31 15:01:22 +0000
commit11f32b73e0dc9287e305b5b9980d24aecdc8c17f (patch)
treef07778f3d4e79d2973013519118772697cd03e3b /compiler/rustc_errors/src
parentcdaa12e3dff109f72a5a8a0a67ea225052122a79 (diff)
parent4eaf4c261511295483757df8f01f28e0d19349ca (diff)
downloadrust-11f32b73e0dc9287e305b5b9980d24aecdc8c17f.tar.gz
rust-11f32b73e0dc9287e305b5b9980d24aecdc8c17f.zip
Auto merge of #120524 - Nadrieril:rollup-67952ib, r=Nadrieril
Rollup of 9 pull requests

Successful merges:

 - #120207 (check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test)
 - #120321 (pattern_analysis: cleanup the contexts)
 - #120355 (document `FromIterator for Vec` allocation behaviors)
 - #120430 (std: thread_local::register_dtor fix proposal for FreeBSD.)
 - #120469 (Provide more context on derived obligation error primary label)
 - #120472 (Make duplicate lang items fatal)
 - #120490 (Don't hash lints differently to non-lints.)
 - #120495 (Remove the `abi_amdgpu_kernel` feature)
 - #120501 (rustdoc: Correctly handle attribute merge if this is a glob reexport)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index bf1ab37a1cf..b87eef07fd5 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -109,8 +109,6 @@ pub struct Diagnostic {
     /// `span` if there is one. Otherwise, it is `DUMMY_SP`.
     pub sort_span: Span,
 
-    /// If diagnostic is from Lint, custom hash function ignores children.
-    /// Otherwise hash is based on the all the fields.
     pub is_lint: Option<IsLint>,
 
     /// With `-Ztrack_diagnostics` enabled,
@@ -980,22 +978,24 @@ impl Diagnostic {
     ) -> (
         &Level,
         &[(DiagnosticMessage, Style)],
-        Vec<(&Cow<'static, str>, &DiagnosticArgValue)>,
         &Option<ErrCode>,
-        &Option<IsLint>,
         &MultiSpan,
+        &[SubDiagnostic],
         &Result<Vec<CodeSuggestion>, SuggestionsDisabled>,
-        Option<&[SubDiagnostic]>,
+        Vec<(&DiagnosticArgName, &DiagnosticArgValue)>,
+        &Option<IsLint>,
     ) {
         (
             &self.level,
             &self.messages,
-            self.args().collect(),
             &self.code,
-            &self.is_lint,
             &self.span,
+            &self.children,
             &self.suggestions,
-            (if self.is_lint.is_some() { None } else { Some(&self.children) }),
+            self.args().collect(),
+            // omit self.sort_span
+            &self.is_lint,
+            // omit self.emitted_at
         )
     }
 }