ICE with global variable promoting extern fn to @fn #7364
Closed
Description
enum Foo {
Call(@fn())
}
static f: Foo = Call(main);
fn main() { }
This also ICEs if Foo is a struct, although it doesn't ICE if you change it to Option<@fn()>
.
oops.rs:5:21: 5:25 error: internal compiler error: unexpected static function:
region re_static sigil ManagedSigil
oops.rs:5 static f: Foo = Call(main);
^~~~