fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder)
Expand description

Add error-format flags to the command.

Cargo always uses JSON output. This has several benefits, such as being easier to parse, handles changing formats (for replaying cached messages), ensures atomic output (so messages aren’t interleaved), allows for intercepting messages like rmeta artifacts, etc. rustc includes a “rendered” field in the JSON message with the message properly formatted, which Cargo will extract and display to the user.