Post-drop elaboration const-checking fails on ZSTs #90770
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.
Found by @nbdd0121 here, the following code compiles when it shouldn't:
The final "post-borrowck cleanup" pass is the Deaggregator, which replaces the assignment _1 = S; with a nop because S has no fields. That means
_1
never gets initialized in the MIR before itsDrop
terminator, so the qualification logic doesn't assign itNeedsDrop
.The text was updated successfully, but these errors were encountered: