Skip to content

ICE with static function pointer to generic instantiation of enum constructor #13972

Closed
@Kimundi

Description

@Kimundi

Testcase:

static BLOCK_ENUM_CONSTRUCTOR: fn(uint) -> Option<uint> = Some;

fn main() {}

Output:

error: internal compiler error: adt::represent_type called on non-ADT type
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at '~Any', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:155

Metadata

Metadata

Assignees

No one assigned

    Labels

    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