Skip to content

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

Closed
@Kixunil

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.

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