Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICEs should print -Cincremental #128590

Closed
workingjubilee opened this issue Aug 3, 2024 · 4 comments
Closed

ICEs should print -Cincremental #128590

workingjubilee opened this issue Aug 3, 2024 · 4 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug.

Comments

@workingjubilee
Copy link
Member

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
@workingjubilee workingjubilee added the C-bug Category: This is a bug. label Aug 3, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 3, 2024
@workingjubilee workingjubilee added the A-diagnostics Area: Messages for errors, warnings, and lints label Aug 3, 2024
@workingjubilee
Copy link
Member Author

...briefly encountering an existential quandary of whether this counts as I-ICE

@jieyouxu
Copy link
Member

jieyouxu commented Aug 3, 2024

...briefly encountering an existential quandary of whether this counts as I-ICE

This is an A-ICE

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Aug 3, 2024

I see this as a wontfix.
in -Cincremental=x x is the path to the incremental cache dir.

If this is an absolute path, it may leak things like the users real name, on windows for example.

I don't think we have ever logged this properly

related: #101595 / #101588

@workingjubilee
Copy link
Member Author

Hm, actually I think I misunderstood something about how -Cincremental is interacted with by CARGO_INCREMENTAL and [build.incremental] and will file a different bug tomorrow after I wake up and reassess.

@workingjubilee workingjubilee closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants