about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_errors/src/json.rs3
-rw-r--r--src/doc/rustc/src/json.md4
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs
index 38699c26680..aa3749334d9 100644
--- a/compiler/rustc_errors/src/json.rs
+++ b/compiler/rustc_errors/src/json.rs
@@ -317,7 +317,8 @@ struct ArtifactNotification<'a> {
 
 #[derive(Serialize)]
 struct FutureBreakageItem<'a> {
-    // Actually Diagnostic, but we want to make sure it gets serialized with `type`.
+    // Always EmitTyped::Diagnostic, but we want to make sure it gets serialized
+    // with "$message_type".
     diagnostic: EmitTyped<'a>,
 }
 
diff --git a/src/doc/rustc/src/json.md b/src/doc/rustc/src/json.md
index eaace8883f2..9daa0810126 100644
--- a/src/doc/rustc/src/json.md
+++ b/src/doc/rustc/src/json.md
@@ -222,7 +222,7 @@ flag][option-emit] documentation.
 ```javascript
 {
     /* Type of this message */
-    "type": "artifact",
+    "$message_type": "artifact",
     /* The filename that was generated. */
     "artifact": "libfoo.rlib",
     /* The kind of artifact that was generated. Possible values:
@@ -246,7 +246,7 @@ information, even if the diagnostics have been suppressed (such as with an
 ```javascript
 {
     /* Type of this message */
-    "type": "future_incompat",
+    "$message_type": "future_incompat",
     /* An array of objects describing a warning that will become a hard error
        in the future.
     */