-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)
Description
We do not allow ptr-to-int casts in const
context, so people might be tempted to do a transmute instead. This will not work, and if they ever actually test their code during CTFE they will get an error, but it might still be good to add an extra layer of defense here (since this is a rather odd corner of the language) and have a lint for this.
@jhpratt started working on this, here's a link.
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)