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

+5
View File
@@ -131,3 +131,8 @@ RFC 0033 bounded I/O (cl100k, relative to BinaryHeap): Quick Reference 8,284 →
RFC 0034 owning buffered files (cl100k, relative to bounded I/O): Quick Reference 8,350 → 8,445 (+1.1%), other source docs 58,473 → 61,223 (+4.7%), full source excluding AIR 66,823 → 69,668 (+4.3%). library/std.md is 24,364 tokens; AIR remains 179,282 bytes / 51 sections. Ten safe concrete operations keep fixed allocation, file transfer, prefetch and first-error/partial-write cleanup visible. No new syntax, diagnostic or verifier/runtime state; cumulative source growth is +105.0%, justified by these contracts without an empirical MCC claim. Full representation/API details stay on demand; front-door consolidation remains separate work.
RFC 0035 caller-buffer paths (cl100k, relative to buffered files): Quick Reference 8,445 → 8,518 (+0.9%), other source docs 61,223 → 63,296 (+3.4%), full source excluding AIR 69,668 → 71,814 (+3.1%). library/std.md is 26,437 tokens; AIR remains 179,282 bytes / 51 sections. Six pure operations return raw Copy ranges or write a measured canonical prefix, keeping lifetime, byte syntax, capacity failure and authority visible. No new syntax, diagnostic or verifier/runtime state; cumulative source growth is +111.3%, justified by these contracts without an empirical MCC claim. API details stay on demand; front-door consolidation remains separate work.
RFC 0036 (Proposed), explicit source borrow returns (cl100k, relative to paths): Quick Reference 8,518 → 8,642 (+1.46%), other source docs 63,296 → 64,160 (+1.37%), full source excluding AIR 71,814 → 72,802 (+1.38%). language/ownership.md is 1,834 tokens; AIR remains 179,282 bytes / 51 sections. Existing `from`, ref/mut bindings and named returns reuse verifier/runtime primitives; frontend ancestry selects transferred lexical ends. No new keyword, AIR feature, verifier state or diagnostic. Cumulative full-source growth is +114.24%, justified in the proposed RFC without an empirical MCC claim. This measurement records the implementation for review, not owner adoption.
RFC 0036 review fixes clarify reserved task borrow returns and known array bounds in unused generic signatures. These rules add 54 cl100k tokens: other source docs 64,160 → 64,214, full source 72,848 → 72,902 (+0.07%); Quick Reference stays 8,688. o200k groups are 8,723 / 64,413 / 73,136; Qwen2.5 8,954 / 65,794 / 74,748. language/ownership.md is 1,873 cl100k tokens; AIR and library/std.md stay unchanged. The additions make source rejection predictable without adding a semantic feature.