Skip to content

generics-related ICE: 'called Option::unwrap() on a None value' #87603

Closed
@0bl-user

Description

@0bl-user

having a struct field depending on an a const expression (field: [T; N * 2]) using const_evaluatable_checked and a corresponding where [T; N * 2]: Sized. Think this was working before 1.56 nightly.. Getting called Option::unwrap() on a None value, compiler/rustc_metadata/src/rmeta/decoder.rs:914:54 when importing lib.rs, but, everything works when that same lib is in main.rs. Also any suggestions for using const_evaluatable_checked. https://users.rust-lang.org/t/1-56-nightly-change-in-const-evaluatable-checked/62865

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)C-bugCategory: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions