PhantomData<fn()>
is unstable in const fn
#69459
Labels
A-const-fn
Area: const fn foo(..) {..}. Pure functions which can be applied at compile time.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
I tried this code:
(playground)
I expected it to work, but it doesn't work.
Error:
I use
PhantomData<fn(T) -> T>
to make type invariant overT
& mark that I don't ownT
. I see no reason for this code to be unstable.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: