On this page

0034. Reserve seeded option and result names consistently

Context

The M4.5 review found that struct ok and fn none could redefine seeded vocabulary despite the reference's reservation claim. The owner requests consistent E0203 rejection rather than weakening the reference. Bare ok, some and err also incorrectly bypassed local-name resolution.

Decision

Reserve option, result, some, none, ok and err in both top-level type and function namespaces. Report E0203 for every such declaration. This deliberately replaces the agreed implementation plan's E0211 for enum option and extends ADR-0025 reservation across both namespaces, as requested by the owner.

All six remain identifier tokens and legal local names. Bare some, ok and err require a local; otherwise E0201 suggests the constructor call. Bare none retains its fallback after locals. Qualified payload variants continue to use E0512 when their payload is missing.

Alternatives considered

Consequences

Diagnostics and the reference agree; valid constructor calls and locals are unchanged. Previously accepted top-level collisions are now rejected. ADR-0025's union representation and propagation semantics remain unchanged.