Skip to content

Commit

Permalink
Update docs too
Browse files Browse the repository at this point in the history
  • Loading branch information
jsgf committed Oct 16, 2023
1 parent 8f08458 commit 8aa4fb5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/doc/rustc/src/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ If parsing the output with Rust, the
[`cargo_metadata`](https://crates.io/crates/cargo_metadata) crate provides
some support for parsing the messages.

Each type of message has a `type` field which can be used to distinguish the
different formats. When parsing, care should be taken to be forwards-compatible
with future changes to the format. Optional values may be `null`. New fields may
be added. Enumerated fields like "level" or "suggestion_applicability" may add
new values.
Each type of message has a `$message_type` field which can be used to
distinguish the different formats. When parsing, care should be taken
to be forwards-compatible with future changes to the format. Optional
values may be `null`. New fields may be added. Enumerated fields like
"level" or "suggestion_applicability" may add new values.

## Diagnostics

Expand All @@ -32,7 +32,7 @@ Diagnostics have the following format:
```javascript
{
/* Type of this message */
"type": "diagnostic",
"$message_type": "diagnostic",
/* The primary message. */
"message": "unused variable: `x`",
/* The diagnostic code.
Expand Down

0 comments on commit 8aa4fb5

Please sign in to comment.