-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE with global variable promoting extern fn to @fn #7364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Triage; still valid. I guess this should be an error, since It appears to be something do to with concrete function types, e.g. the following doesn't ICE: enum Foo<F> {
Call(F)
}
static f: Foo<@fn()> = Call(main);
fn main() { } Although the following does: enum Foo<T> {
Call(@fn() -> T)
}
static f: Foo<()> = Call(main);
fn main() { } Backtrace for the original code:
|
Nominating (not sure how closure reform affects this issue). |
works for borrowed fn. |
actually we need to revisit whether it should work or not with proc. Low priority. |
See also discussion on moving from statics in #10577 |
Rustup r? `@ghost` changelog: none
This also ICEs if Foo is a struct, although it doesn't ICE if you change it to
Option<@fn()>
.The text was updated successfully, but these errors were encountered: