ICE reports ignore `--color=never`
Open
Nobody has claimed this yet.
A-driver
C-bug
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
rustc +nightly --color=never 123629.rs
// 123629.rs
//@ known-bug: #123629
#![feature(generic_assert)]
fn foo()
where
for<const N: usize = { assert!(u) }> ():,
{
}
fn main() {}
I expected to see this happen: No colors in the output
Instead, this happened: Colors in the output, around note:
I would guess that the problem is that this unconditionally uses Auto:
Meta
rustc --version --verbose:
rustc 1.93.0-nightly (b84478a1c 2025-11-30)
binary: rustc
commit-hash: b84478a1c477756cd3e1974eda867a6bb31e8902
commit-date: 2025-11-30
host: x86_64-unknown-linux-gnu
release: 1.93.0-nightly
LLVM version: 21.1.5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with rustc +nightly --color=never 123629.rs, then inspect compiler/rustc_driver_impl/src/lib.rs around line 1481, where the issue identifies unconditional Auto color handling. Trace how the command-line color choice reaches the ICE output and verify that the command produces no colored text when done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100