about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/json.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/json.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/json.rs')
-rw-r--r--compiler/rustc_errors/src/json.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs
index 99bdf9f99c8..88a83c8bf78 100644
--- a/compiler/rustc_errors/src/json.rs
+++ b/compiler/rustc_errors/src/json.rs
@@ -17,7 +17,7 @@ use crate::registry::Registry;
 use crate::translation::{to_fluent_args, Translate};
 use crate::{
     diagnostic::IsLint, CodeSuggestion, FluentBundle, LazyFallbackBundle, MultiSpan, SpanLabel,
-    SubDiagnostic, TerminalUrl,
+    Subdiag, TerminalUrl,
 };
 use rustc_lint_defs::Applicability;
 
@@ -431,16 +431,16 @@ impl Diagnostic {
     }
 
     fn from_sub_diagnostic(
-        diag: &SubDiagnostic,
+        subdiag: &Subdiag,
         args: &FluentArgs<'_>,
         je: &JsonEmitter,
     ) -> Diagnostic {
-        let translated_message = je.translate_messages(&diag.messages, args);
+        let translated_message = je.translate_messages(&subdiag.messages, args);
         Diagnostic {
             message: translated_message.to_string(),
             code: None,
-            level: diag.level.to_str(),
-            spans: DiagnosticSpan::from_multispan(&diag.span, args, je),
+            level: subdiag.level.to_str(),
+            spans: DiagnosticSpan::from_multispan(&subdiag.span, args, je),
             children: vec![],
             rendered: None,
         }