-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE on const &'static closure #25180
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
(edit: reduced the example code a bit) |
Rustc: rustc 1.1.0-nightly (4356220 2015-05-04) (built 2015-05-05) Backtrace:
It appears the By the way, the ICE is reproducible with beta (on playground), too. |
Same thing goes if I change the |
Huh, this is not the The assert is indeed faulty, and there are two ways to handle this: either remove the assert and wrap the method in The first way has the disadvantage of duplicating the setup done here, which on second thought, seems entirely pointless (other than for expressions in |
According to @eddyb – and my tests – the following gets rid of the ICE in issue rust-lang#25180.
According to @eddyb – and my tests – the following gets rid of the ICE in issue rust-lang#25180.
According to @eddyb – and my tests – the following gets rid of the ICE in issue rust-lang#25180.
FWIW: The ICE does no longer occur on my system (rustc 1.2.0-nightly (78c4d53 2015-05-30)) |
I'll create a regression test for this |
@llogiq Yep, I did :) It's currently in the queue |
If I try to create a
const &'static Fn(u32)
, I trigger an ICE:A small example code snippet is on the playpen (see http://is.gd/U0DmxV):
The text was updated successfully, but these errors were encountered: