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

'rustc' panicked at 'Box<Any>', when const expr evaluation panics #44578

Closed
Kixunil opened this issue Sep 14, 2017 · 3 comments
Closed

'rustc' panicked at 'Box<Any>', when const expr evaluation panics #44578

Kixunil opened this issue Sep 14, 2017 · 3 comments
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Kixunil
Copy link
Contributor

Kixunil commented Sep 14, 2017

After seeing this amusing workaround for conditions in const expr, I decided to try it out. Then I was wondering what would happen if I caused index out-of-bounds. That led me to this code.

While it correctly points to the error, it also says "the compiler unexpectedly panicked. this is a bug." and asks for reporting, so I'm reporting here.

@Mark-Simulacrum
Copy link
Member

cc @eddyb

@Mark-Simulacrum Mark-Simulacrum added A-const-fn C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Sep 17, 2017
@eddyb
Copy link
Member

eddyb commented Sep 18, 2017

Works correctly on beta and nightly, doesn't it?

@Kixunil
Copy link
Contributor Author

Kixunil commented Sep 18, 2017

@eddyb I totally forgot to check nightly. Indeed, it's correct there.

@eddyb eddyb added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Sep 18, 2017
MaloJaffre added a commit to MaloJaffre/rust that referenced this issue Oct 4, 2017
Also ignore `attr-on-trait` test on stage-1 to keep `./x.py test --stage 1` successful.

Fixes rust-lang#30355.
Fixes rust-lang#33241.
Fixes rust-lang#36400.
Fixes rust-lang#37887.
Fixes rust-lang#44578.
bors added a commit that referenced this issue Oct 8, 2017
Fix some E-needstest issues.

Also ignore `attr-on-trait` test on stage-1 to keep `./x.py test --stage 1` successful.

Fixes #30355.
Fixes #33241.
Fixes #36400.
Fixes #37887.
Fixes #44578.
@RalfJung RalfJung added the A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants