Skip to content

Commit

Permalink
Update some more cases of "type" -> "$message_type"
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 21, 2023
1 parent 8aa4fb5 commit fe50c53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion compiler/rustc_errors/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
}

Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
*/
Expand Down

0 comments on commit fe50c53

Please sign in to comment.