Skip to content

Illegal Instruction Promoting const panic! #54305

Closed
@cramertj

Description

@cramertj

Playground link

#![feature(min_const_fn, const_panic)]

const fn foo() {
    panic!("")
}

fn main() {
    let _: &'static () = &foo();
}

causes an illegal hardware instruction. cc @oli-obk

Metadata

Metadata

Assignees

Labels

A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions