about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/diagnostic.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-23 06:42:05 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-28 08:33:25 +1100
commit4e1f9bd528aef7215bb3b446fcdf43368371da37 (patch)
tree4d8d3d243ee27967a7c284fd81eb2dd73eb8cba9 /compiler/rustc_errors/src/diagnostic.rs
parent366536ba2beda7cd5197e76c7c918066ffe5ad40 (diff)
downloadrust-4e1f9bd528aef7215bb3b446fcdf43368371da37.tar.gz
rust-4e1f9bd528aef7215bb3b446fcdf43368371da37.zip
Rename `SubDiagnostic` as `Subdiag`.
Note the change of the `D` to `d`, to match all the other names that
have `Subdiag` in them, such as `SubdiagnosticMessage` and
`derive(Subdiagnostic)`.
Diffstat (limited to 'compiler/rustc_errors/src/diagnostic.rs')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index d2011d419e9..38c0fbf6476 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -275,7 +275,7 @@ pub struct DiagInner {
     pub messages: Vec<(DiagnosticMessage, Style)>,
     pub code: Option<ErrCode>,
     pub span: MultiSpan,
-    pub children: Vec<SubDiagnostic>,
+    pub children: Vec<Subdiag>,
     pub suggestions: Result<Vec<CodeSuggestion>, SuggestionsDisabled>,
     pub args: DiagnosticArgMap,
 
@@ -390,7 +390,7 @@ impl DiagInner {
         message: impl Into<SubdiagnosticMessage>,
         span: MultiSpan,
     ) {
-        let sub = SubDiagnostic {
+        let sub = Subdiag {
             level,
             messages: vec![(
                 self.subdiagnostic_message_to_diagnostic_message(message),
@@ -413,7 +413,7 @@ impl DiagInner {
         &[(DiagnosticMessage, Style)],
         &Option<ErrCode>,
         &MultiSpan,
-        &[SubDiagnostic],
+        &[Subdiag],
         &Result<Vec<CodeSuggestion>, SuggestionsDisabled>,
         Vec<(&DiagnosticArgName, &DiagnosticArgValue)>,
         &Option<IsLint>,
@@ -451,7 +451,7 @@ impl PartialEq for DiagInner {
 /// A "sub"-diagnostic attached to a parent diagnostic.
 /// For example, a note attached to an error.
 #[derive(Clone, Debug, PartialEq, Hash, Encodable, Decodable)]
-pub struct SubDiagnostic {
+pub struct Subdiag {
     pub level: Level,
     pub messages: Vec<(DiagnosticMessage, Style)>,
     pub span: MultiSpan,
@@ -1231,7 +1231,7 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
             .into_iter()
             .map(|m| (self.subdiagnostic_message_to_diagnostic_message(m.content), m.style))
             .collect();
-        let sub = SubDiagnostic { level, messages, span };
+        let sub = Subdiag { level, messages, span };
         self.children.push(sub);
     }