You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An enum of values is not Copy (D120 stage 3 left enums opt-in), so D144 makes match g on a bare local need move g #2549
Ceremony report (D144 fallout). An enum whose every payload is a value is not Copy unless impl Copy is written, so under D144 a match on a bare local observes it and a consuming use of the payload is refused:
PR #2547 (D144 completed): error: cannot consume read-only view binding 'h'; clone it or transfer from the owner; the fixture behav_generic_enum_nested_generic_payload.w now spells match move g, which is a token no reader thinks means anything: G[i64] and H[i64] are integers in a tag.
Law 1 and D111: values have no identity; D120 stage 3 made a struct of values a value with no impl Copy and left enums opt-in ("an enum instance stays opt-in", Sema.is_copy). The same compositional rule for enums — an enum is a value when every payload is, unless it has a Drop impl or is a resource type — removes the move. It is an ownership question, so a brief for Eric, not delegated. Count in the tree after the sweep: the two fixtures that now spell move for this reason (behav_generic_enum_nested_generic_payload.w; the Option-of-List case in da_c_facade_production_forms.w is a resource and stays).
Triage 2026-10-25, with v0.15.3.0 (main a261b65): reproduced, and the next step is Eric's ruling (ownership, as the report says).
$ with run main.w # the report's G/H program
error: cannot consume read-only view binding `h`; clone it or transfer from the owner
--> main.w:14:32
14 | G.A(h) => print(show_h(h))
What the rulings say. D111: values have no identity, and passing one copies it. D120 stage 3 made a struct of values a value with no impl Copy and left enums opt-in ("an enum instance stays opt-in", Sema.is_copy).
The question: should an enum be a value (Copy) when every payload is a value, unless it has a Drop impl or is a resource type, as structs already are? That removes the move g this match needs today.
Activity
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): reproduced, and the next step is Eric's ruling (ownership, as the report says).What the rulings say. D111: values have no identity, and passing one copies it. D120 stage 3 made a struct of values a value with no
impl Copyand left enums opt-in ("an enum instance stays opt-in",Sema.is_copy).The question: should an enum be a value (Copy) when every payload is a value, unless it has a
Dropimpl or is aresource type, as structs already are? That removes themove gthis match needs today.An enum of values is a value (#2549); x86_64 Windows long double is w…