Commit 8843223
committed
Change printing of "
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 rust-lang#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
```--error-format is unstable" errors.1 parent f5a09a9 commit 8843223
1 file changed
+2
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2051 | 2051 | | |
2052 | 2052 | | |
2053 | 2053 | | |
2054 | | - | |
2055 | 2054 | | |
2056 | 2055 | | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
| 2056 | + | |
2062 | 2057 | | |
2063 | 2058 | | |
2064 | 2059 | | |
2065 | 2060 | | |
2066 | 2061 | | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | 2062 | | |
2072 | 2063 | | |
2073 | 2064 | | |
| |||
2665 | 2656 | | |
2666 | 2657 | | |
2667 | 2658 | | |
2668 | | - | |
| 2659 | + | |
2669 | 2660 | | |
2670 | 2661 | | |
2671 | 2662 | | |
| |||
0 commit comments