1.59
accidentally stabilized dropping Box<T>
s in const fn
s
#94804
Labels
P-high
High priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
(playground)
Note that this works even if
T
implementsDrop
in a non-const
way. This seems hightly problematic, especially provided we eventually want to support constructingBox
at compile time.Relevant PR: #91884
Of course that impl claims to be unstable, but as we all know trait implementations are never unstable, unless the trait is unstable. (For ordinary traits, implementations of
const Trait
are thus unstable merely due to the fact that no user can use any such implementations in stable code yet.)@rustbot label regression-from-stable-to-stable
I don’t know what team to tag.The fix should be straightforward: Remove the
const Drop for Box<T, A>
implementation (i.e. revert it to be non-const
), and add a test.The text was updated successfully, but these errors were encountered: