You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a const_allocate intrinsic to perform heap allocations during CTFE. It should not be called during runtime, but we do have to generate some code for that case. Currently, we make it return NULL.
I think calling this at runtime is always an error, so we shouldn't just silently continue execution. We should either panic or abort. (The codegen backend already knows how to do both of these things, so this should not be very hard to implement.)
@rust-lang/wg-const-eval what do you think?
The text was updated successfully, but these errors were encountered:
Seems reasonable. I am still hoping we can just not generate code for these intrinsics at all, but considering the extra effort that requires, we can just turn them into aborts and thus force everyone to use const_eval_select and handle the runtime case explicitly.
Maybe i'll just take this opportunity and implement #93145 instead, so backends just get MIR instead of having to hand-roll some logic for each backend
We have a const_allocate intrinsic to perform heap allocations during CTFE. It should not be called during runtime, but we do have to generate some code for that case. Currently, we make it return NULL.
I think calling this at runtime is always an error, so we shouldn't just silently continue execution. We should either panic or abort. (The codegen backend already knows how to do both of these things, so this should not be very hard to implement.)
@rust-lang/wg-const-eval what do you think?
The text was updated successfully, but these errors were encountered: