rust-lang / rust-lang/rust

ICE reports ignore `--color=never`

Open
#149,566 1 comment 0 reactions 0 assignees View on GitHub

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:

https://github.com/rust-lang/rust/blob/646a3f8c15baefb98dc6e0c1c1ba3356db702d2a/compiler/rustc_driver_impl/src/lib.rs#L1481

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.