If you use nightly Rust and run rustup update, you'll find a new goodie tonight that I'm particularly happy about: experimental "no graphics" diagnostics in `cargo` behind the flag `-Zterm-graphics` and in `rustc` behind the flags `-Znightly-features --error-format=human-no-graphics`. (These names will likely change.)
You can permanently turn this feature on, which will only take effect in nightly, by adding the following to your `.cargo/config.toml`, which will be used on nightly and ignored on stable:
```
[unstable]
term-graphics = true
```
If you also add `NO_GRAPHICS=1` to your environment flags, the all of your builds using nightly will use the new output.
In lieu of the environment variable, you can also add the following to your `.cargo/config.toml`, but this will make stable `cargo` complain about an unused config key:
```
[term]
graphics = false
```
Once the feature is stable, it will be much smoother, but expect rough edges at this time. Do let us know about them when you encounter them!
![Current rustc ASCII-art output:
warning: unused import: `std::fmt::Write`
--> examples/simple.rs:1:5
|
1 | use std::fmt::Write;
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default](https://cdn.fosstodon.org/cache/media_attachments/files/117/635/540/074/492/315/small/b1c63d8e81d1dcdb.png)
![NO_GRAPHICS rustc output:
warning: unused import: `std::fmt::Write`
at examples/simple.rs:1:5
note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default](https://cdn.fosstodon.org/cache/media_attachments/files/117/635/540/138/106/782/small/a2ba25943a9afe94.png)

![warning: unnecessary parentheses around match arm expression
at examples/multiple-diagnostics.rs:124:17
note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
on line 124, column 17
on line 215, column 9
error E0308: `match` arms have incompatible types
at examples/multiple-diagnostics.rs:99:18 to 121:10: expected `()`, found `&str`
on line 7, column 13: `match` arms have incompatible types
on line 8, column 17 to line 98, column 10: this is found to be of type `()`
error E0308: `match` arms have incompatible types
at examples/multiple-diagnostics.rs:216:18 to 239:10: expected integer, found `&str`
on line 123, column 13: `match` arms have incompatible types
on line 124, column 17 to line 215, column 10: this is found to be of type `{integer}`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `blog-examples` (example "multiple-diagnostics") due to 2 previous errors; 1 warning emitted](https://cdn.fosstodon.org/cache/media_attachments/files/117/635/549/627/002/917/small/1ad549f85ddb7244.png)
![rustc short format:
examples/multiple-diagnostics.rs:124:17: warning: unnecessary parentheses around match arm expression
examples/multiple-diagnostics.rs:99:18: error[E0308]: `match` arms have incompatible types: expected `()`, found `&str`
examples/multiple-diagnostics.rs:216:18: error[E0308]: `match` arms have incompatible types: expected integer, found `&str`
error: could not compile `blog-examples` (example "multiple-diagnostics") due to 2 previous errors; 1 warning emitted](https://cdn.fosstodon.org/cache/media_attachments/files/117/635/549/672/965/118/small/0bb5abc3ec7ee076.png)
