diff options
| author | bors <bors@rust-lang.org> | 2023-11-21 06:30:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-21 06:30:14 +0000 |
| commit | 85c42b751e65bd77044163e35a3b73ed7d15bec3 (patch) | |
| tree | 58d7226a7952a6b611808b5f9fe5f03134e734b6 /tests/ui/json/json-multiple.stderr | |
| parent | 390e3c8b6615afb4f0b9bb2c3db3ad033ac75d78 (diff) | |
| parent | fe50c5359e863cfefe18382d7e63ba188c505f07 (diff) | |
| download | rust-85c42b751e65bd77044163e35a3b73ed7d15bec3.tar.gz rust-85c42b751e65bd77044163e35a3b73ed7d15bec3.zip | |
Auto merge of #115691 - jsgf:typed-json-diags, r=est31,dtolnay
Add `$message_type` field to distinguish json diagnostic outputs Currently the json-formatted outputs have no way to unambiguously determine which kind of message is being output. A consumer can look for specific fields in the json object (eg "message"), but there's no guarantee that in future some other kind of output will have a field of the same name. This PR adds a `"type"` field to add json outputs which can be used to unambiguously determine which kind of output it is. The mapping is: `diagnostic`: regular compiler diagnostics `artifact`: artifact notifications `future_incompat`: Future incompatibility report `unused_extern`: Unused crate warnings/errors This matches the "internally tagged" representation for serde enums.
Diffstat (limited to 'tests/ui/json/json-multiple.stderr')
| -rw-r--r-- | tests/ui/json/json-multiple.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/json/json-multiple.stderr b/tests/ui/json/json-multiple.stderr index 55ccfd5fa70..7689fb94a6c 100644 --- a/tests/ui/json/json-multiple.stderr +++ b/tests/ui/json/json-multiple.stderr @@ -1 +1 @@ -{"artifact":"$TEST_BUILD_DIR/json/json-multiple/libjson_multiple.rlib","emit":"link"} +{"$message_type":"artifact","artifact":"$TEST_BUILD_DIR/json/json-multiple/libjson_multiple.rlib","emit":"link"} |
