rust/tests/ui/rmeta
bors 85c42b751e 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.
2023-11-21 06:30:14 +00:00
..
auxiliary Emit error instead of ICE when optimized MIR is missing 2023-08-30 20:43:31 +02:00
emit-artifact-notifications.polonius.stderr
emit-artifact-notifications.rs
emit-artifact-notifications.stderr Use $message_type as the tag 2023-10-13 15:50:01 -07:00
emit-metadata-obj.rs
no_optitimized_mir.rs Emit error instead of ICE when optimized MIR is missing 2023-08-30 20:43:31 +02:00
no_optitimized_mir.stderr Emit error instead of ICE when optimized MIR is missing 2023-08-30 20:43:31 +02:00
rmeta_lib.rs
rmeta_lib.stderr
rmeta_meta_main.rs
rmeta_meta_main.stderr tweak logic of "unknown field" label 2023-11-18 00:40:11 +00:00
rmeta-lib-pass.rs
rmeta-pass.rs
rmeta-priv-warn.rs
rmeta.rs
rmeta.stderr