mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00

Handle $message_type in JSON diagnostics ### What does this PR try to resolve? Unblocks https://github.com/rust-lang/rust/pull/115691. Without this change, Cargo's testsuite fails in `doc::doc_message_format` and `metabuild::metabuild_failed_build_json`. ### How should we test and review this PR? Tested with and without https://github.com/rust-lang/rust/pull/115691. In Cargo repo: `cargo test --test testsuite` In Rust repo: `x.py test src/tools/cargo` (separately on master and $message_type PR)