cli: implement explicit source borrow returns

This commit is contained in:
dev committed 2026-10-07 18:20:45 +03:00
1 parent 715a8be491
commit a9a0d63f27
78 files changed
+970 -48

No files matched your search

+3
View File
@@ -28,6 +28,7 @@ Status values: `open`, `resolved`.
| Q-020 | resolved | P2 | Size bound for SSA array values |
| Q-024 | resolved | P5 | Memory-model clarifications found by the independent oracle |
| Q-025 | resolved | STD-5 | Array construction from complete element values |
| Q-034 | open | P6-11 adoption | Source borrow-return calls (implementation prepared; RFC 0036 Proposed) |
| Q-035 | resolved | STD-5 | Whole-value linear aggregates |
| Q-036 | resolved | STD-6a | Dynamic initialized linear buffer storage and drain |
| Q-038 | resolved | STD-6d.2 | Pure construction of built-in errors |
@@ -260,6 +261,8 @@ The source plan names monomorphized generics but does not define application syn
During STD-4 validation, existing `from` declarations still return the frontend's unimplemented outcome and borrow bindings accept places rather than borrow-returning calls. Generics preserve the syntax/metadata and this existing limitation; they do not add an implicit lifetime or a new binding spelling. A separate source/lifetime increment must specify and implement the binding/temporary-end rules vertically before public libraries return retained borrowed views.
**Implementation prepared (P6-11, RFC 0036 Proposed):** spec 15 §19 and the frontend define exact-mode ref/mut call bindings, a named borrowed `from` argument, named returns and transfer of owned ancestors. The existing AIR verifier enforces provenance/lifetime; no runtime rule or AIR construct changes. Source/AIR twins, generic/package/profile checks, task loans and per-step collection cover the increment. Owner adoption of RFC 0036 remains separate.
## Q-035 — Whole-value linear aggregates
**Resolved on the STD-5 branch (RFC 0023 Implemented):** spec 03 §25 and source spec 15 §16 specify complete construction/exhaustive consumption, fixed arrays, explicit exchange and ownership-preserving allocation failure. No partial-move/field initialization state or destructor is introduced. Among heap/frame/region storage forms, only individual own<T> may hold linear content; frame locals, repeated heap arrays and bulk regions retain Copy-only content. Dynamic linear buffers need a separately specified extension in the collection phase.