Skip to content

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

Closed

Description

@Kixunil

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.

Activity

  1. Mark-Simulacrum commented on Sep 17, 2017

    @Mark-Simulacrum
    Member
  2. added
    C-bugCategory: This is a bug.
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Sep 17, 2017
  3. eddyb commented on Sep 18, 2017

    @eddyb
    Contributor

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

  4. Kixunil commented on Sep 18, 2017

    @Kixunil
    ContributorAuthor

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

  5. added
    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
    on Sep 18, 2017
  6. added a commit that references this issue on Oct 4, 2017
    7428806
  7. added a commit that references this issue on Oct 8, 2017
    ade0b01
  8. added
    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)
    on Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions