RFC 2203 not implemented inside a const
block
#65732
Labels
A-const-eval
Area: Constant evaluation (MIR interpretation)
B-unstable
Blocker: Implemented in the nightly compiler and unstable.
C-bug
Category: This is a bug.
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Thanks to RFC 2203, code like the following compiles on nightly:
However, as pointed out by @RalfJung, the same code fails to compile in a
const
block (Playground):Currently, there's two distinct implementations for promotion of temps, one for
fn
andconst fn
and one forconst
andstatic
. RFC 2203 is implemented for the first but not the second.I didn't see an actual issue for this. I'll close this as a dupe if @RalfJung already opened one.
cc #49147
The text was updated successfully, but these errors were encountered: