-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Post-drop elaboration const-checking fails on ZSTs #90770
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-bugCategory: This is a bug.Category: This is a bug.
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, ...)B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-bugCategory: This is a bug.Category: This is a bug.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
_1never gets initialized in the MIR before itsDropterminator, so the qualification logic doesn't assign itNeedsDrop.