diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-05 14:11:12 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-05 14:37:06 +1100 |
| commit | 884322389759a9a9563e492d8bbd96b83c27c2de (patch) | |
| tree | 5ff094b55265ebd6a8cfd21e4d90dcce5977e2f4 /tests/codegen/frame-pointer.rs | |
| parent | f5a09a9e1d162793d16b53cd6ad266a37e11d800 (diff) | |
| download | rust-884322389759a9a9563e492d8bbd96b83c27c2de.tar.gz rust-884322389759a9a9563e492d8bbd96b83c27c2de.zip | |
Change printing of "`--error-format` is unstable" errors.
Currently for these two errors we go to the effort of switching to a
standard JSON emitter, for no obvious reason, and unlike any other
errors. This behaviour was added for `pretty-json` in #45737, and then
`human-annotate-rs` copied it some time later when it was added.
This commit changes things to just using the requested emitter, which is
simpler and consistent with other errors.
Old output:
```
$ rustc --error-format pretty-json
{"$message_type":"diagnostic","message":"`--error-format=pretty-json` is unstable","code":null,"level":"error","spans":[],"children":[],"rendered":"error: `--error-format=pretty-json` is unstable\n\n"}
$ rustc --error-format human-annotate-rs
{"$message_type":"diagnostic","message":"`--error-format=human-annotate-rs` is unstable","code":null,"level":"error","spans":[],"children":[],"rendered":"error: `--error-format=human-annotate-rs` is unstable\n\n"}
```
New output:
```
$ rustc --error-format pretty-json
{
"$message_type": "diagnostic",
"message": "`--error-format=pretty-json` is unstable",
"code": null,
"level": "error",
"spans": [],
"children": [],
"rendered": "error: `--error-format=pretty-json` is unstable\n\n"
}
$ rustc --error-format human-annotate-rs
error: `--error-format=human-annotate-rs` is unstable
```
Diffstat (limited to 'tests/codegen/frame-pointer.rs')
0 files changed, 0 insertions, 0 deletions
