- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-type-systemArea: Type systemArea: Type systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityLow priority
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);
                               ^~~~
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityLow priority