Skip to main content
Next (unreleased) · docs c218d875 · core f63c1e69 · built 2026-10-26 22:39 UTC

A field cannot be moved out of a Drop type, even where its destructor would not need it

Gap​

The Language Spec bans moving a field out of a Drop type unconditionally (legality-2), so a destructor never runs against a value whose fields have been narrowed away. RFC-0137 §5 replaces the ban with row-bounded Drop dispatch: a Drop impl's required field set is the residual row its drop receiver declares, and a move is allowed when the remaining row still covers it. That needs the narrowed drop receiver (RFC-0109). The section "Drop dispatch against a narrowed residual" specifies the mechanism; until it is built the ban is enforced exactly as stated.

Impact​

Code that wants to take one field of a Drop type and let the rest be dropped later must restructure, for example by moving the whole value.

Affects​

Resolution​

Planned, tracked as metel-core#949 (RFC-0137 §5).