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

"joke ICE" should dump flags #70661

Closed
RalfJung opened this issue Apr 1, 2020 · 3 comments · Fixed by #115158
Closed

"joke ICE" should dump flags #70661

RalfJung opened this issue Apr 1, 2020 · 3 comments · Fixed by #115158
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

RalfJung commented Apr 1, 2020

So I wanted to know which exact compiler flags playground is using, and I remembered flags get dumped on an ICE, so I thought I would be clever and added break rust;, our joke ICE.

But alas, it does not dump the flags that way. Could we make the joke ICE even more useful than it already is by making it print the compiler flags like normal ICEs do? :D

@RalfJung RalfJung changed the title "fake ICE" should dump flags "joke ICE" should dump flags Apr 1, 2020
@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 1, 2020
@rcoh
Copy link
Contributor

rcoh commented Apr 2, 2020

So, I don't think regular ICE's dump flags?

➜  rust git:(russell/70677-raw-str-panic) ✗ rustc -g main.rs    
thread 'rustc' panicked at 'begin <= end (2 <= 1) when slicing `r"`', /rustc/76b11980ad416c3ad6143504c2277757ecacf9b5/src/libcore/str/mod.rs:1920:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.44.0-nightly (76b11980a 2020-04-01) running on x86_64-unknown-linux-gnu

but maybe I'm missing something

@RalfJung
Copy link
Member Author

RalfJung commented Apr 2, 2020

This one does

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.44.0-nightly (76b11980a 2020-04-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type bin

note: some of the compiler flags provided by cargo are hidden

@RalfJung
Copy link
Member Author

RalfJung commented Apr 3, 2020

The irony of this is that only now do I realize that I posed this on April 1st.

But I was actually making this suggestion semi-seriously.^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants