rust/compiler/rustc_driver_impl/src
bors dc1feabef2 Auto merge of #147207 - Muscraft:anstyle-anstream, r=davidtwco
refactor: Move to anstream + anstyle for styling

`rustc` uses [`termcolor`](https://crates.io/crates/termcolor) for styling and writing, while `annotate-snippets` uses [`anstyle`](https://crates.io/crates/anstyle) for styling and currently writes directly to a `String`. When rendering directly to a terminal, there isn't/shouldn't be any differences. Still, there are differences in the escape sequences, which leads to slightly different output in JSON and SVG tests. As part of my work to have `rustc` use `annotate-snippets`, and to reduce the test differences between the two, I switched `rustc` to use `anstlye` and [`anstream`](https://crates.io/crates/anstream) for styling and writing.

The first commit migrates to `anstyle` and `anstream` and notably does not change the output. This is because it includes extra formatting to ensure that `anstyle` + `anstream` match the current output exactly. Most of this code is unnecessary, as it adds redundant resets or uses 256-color (8-bit) when it could be using 4-bit color. The subsequent commits remove this extra formatting while maintaining the correct output when rendered.

[Zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/147480-t-compiler.2Fdiagnostics/topic/annotate-snippets.20hurdles)
2025-10-22 16:22:51 +00:00
..
args.rs Some cleanups around EarlyDiagCtxt 2025-02-02 16:06:43 +00:00
lib.rs Auto merge of #147207 - Muscraft:anstyle-anstream, r=davidtwco 2025-10-22 16:22:51 +00:00
pretty.rs rename stable_mir to rustc_public, and rustc_smir to rustc_public_bridge 2025-07-14 09:25:54 +00:00
print.rs fixes for numerous clippy warnings 2025-09-19 20:56:07 +00:00
session_diagnostics.rs Move some calls to before calling codegen_crate 2025-03-21 13:23:07 +00:00
signal_handler.rs Install more signal stack trace handlers 2025-02-17 18:58:31 +01:00