Skip to content

Cargo and rustc are using different tones of red for errors on the terminal #12740

@RalfJung

Description

@RalfJung

Problem

Cargo and rustc are not consistent in terms of how they are coloring errors on the terminal.

Steps

  1. Run cargo check on a project with build failures.

image

As you can see, the two "error" are using two different shades of red. In terms of the colorize crate, rustc is using bright_red and cargo is using red.

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

$ cargo version --verbose
cargo 1.72.0 (103a7ff2e 2023-08-15)
release: 1.72.0
commit-hash: 103a7ff2ee7678d34f34d778614c5eb2525ae9de
commit-date: 2023-08-15
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.1.2-DEV (sys:0.4.63+curl-8.1.2 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u  30 May 2023
os: Debian n/a (trixie) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-console-outputArea: Terminal output, colors, progress bar, etc.C-bugCategory: bugS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions