Skip to content

ICEs should print -Cincremental #128590

Closed as not planned
Closed as not planned
@workingjubilee

Description

@workingjubilee

I tried this code:

fn main() {
    break rust
}

I expected to see this happen: it emitted the value of -Cincremental, possibly normalized to disambiguate true from false without revealing environmental settings.

Instead, this happened:

$ rustc -Cincremental=true sample.rs
error[E0425]: cannot find value `rust` in this scope
 --> sample.rs:2:11
  |
2 |     break rust;
  |           ^^^^ not found in this scope

error[E0268]: `break` outside of a loop or labeled block
 --> sample.rs:2:5
  |
2 |     break rust;
  |     ^^^^^^^^^^ cannot `break` outside of a loop or labeled block

error: internal compiler error: It looks like you're trying to break rust; would you like some ICE?
 --> sample.rs:2:5
  |
2 |     break rust;
  |     ^^^^^^^^^^
  |
  = note: the compiler expectedly panicked. this is a feature.
  = note: we would appreciate a joke overview: https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675
  = note: rustc 1.82.0-nightly (f8060d282 2024-07-30) running on x86_64-unknown-linux-gnu
  = note: compiler flags: -C incremental=[REDACTED]

thread 'rustc' panicked at compiler/rustc_hir_typeck/src/lib.rs:474:10:
Box<dyn Any>
stack backtrace:

Note that -Cincremental has been set to REDACTED, which is a nonsense value. This was configured a long while ago when it was still a "nonstandard" compiler flag, and thus we could assume it was always enabling it. It is now equally important, if not moreso, if it is being disabled.

Meta

rustc --version --verbose:

rustc 1.82.0-nightly (f8060d282 2024-07-30)
binary: rustc
commit-hash: f8060d282d42770fadd73905e3eefb85660d3278
commit-date: 2024-07-30
host: x86_64-unknown-linux-gnu
release: 1.82.0-nightly
LLVM version: 18.1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions