Open RalfJung opened 11 months ago
Thanks for the report!
We're aware of this and have https://github.com/rust-lang/cargo/issues/12627 for tracking one of the approach. See also https://github.com/rust-lang/cargo/issues/2290#issuecomment-1728318644 for a short summary.
I lean to waiting for #12627 but also fine with manual tweaks.
Without investigating it by myself, do you know since which version this happened, or it has been there for a while?
I have no idea. I only just realized this when working on the messages for ui_test. It might have been like this for a while, it might have been hidden by me using a different terminal/configuration, it might be recent.
I went back through time a bit -- this is definitely a very long-standing issue. I see the difference even with Rust 1.40.
Glad to see this wasn't something I broke recently as I've been making changes to how we do styling :)
Cargo uses bold+red and a lot of has likely haven't noticed the discrepancy because bold+red gets colored the same as bright_red in a lot of themes.
We should probably do an audit of all colors used with their intended use and see where it'd work best to align.
Note that as follow ups to #12578 and #12655, cargo-fmt and cargo-clippy were also updated to align with cargo. I'm tempted to do this also to rustup but they hadn't upgrade to clap v4 last I checked.
I'm tempted to do this also to rustup but they hadn't upgrade to clap v4 last I checked.
@epage Oh we have just done that! (Thanks @djc for your https://github.com/rust-lang/rustup/pull/3444!)
Problem
Cargo and rustc are not consistent in terms of how they are coloring errors on the terminal.
Steps
cargo check
on a project with build failures.As you can see, the two "error" are using two different shades of red. In terms of the
colorize
crate, rustc is usingbright_red
and cargo is usingred
.Possible Solution(s)
One of cargo or rustc should switch to the other tone of red. I have a slight preference for "bright red", that's why I reported this as a cargo issue.
Notes
No response
Version