Skip to content

ICE when calling constant function reference #4523

Closed
@jdm

Description

@jdm
rusti> fn foopy() {}
()
rusti> const f: fn() = foopy;
()
rusti> f()
<anon>:39:0: 39:1 error: internal compiler error: Cannot translate def def_const({crate: 0, node: 26}) to a callable thing!
<anon>:39 f()
          ^
rust: task failed at 'explicit failure', /run/media/jdm/ssd/rust/src/libsyntax/diagnostic.rs:62

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions