spec: accept RFC 0009 and integrate unsafe boundaries

- spec 13 §6-§8: unsafe operations (assume, borrow.index.unchecked),
  contagious unsafe effect, trusted boundary with obligation, E6001,
  unsafe report, profiles as policy
- spec 05 §9.3: trusted is the one discharging boundary; spec 07 §8.10
  trusted syntax; 07a, 08 stage order and assume facts
- T0009, E6001 reasons; feature unsafe published
This commit is contained in:
dev committed 2026-10-04 14:38:53 +03:00
1 parent 17ddb98597
commit c510a37cf9
9 files changed
+105 -7

No files matched your search

+4
View File
@@ -262,6 +262,10 @@ Feature `resources`: `file<read>`, `file<write>`, `file<append>`, `listener`, `s
Feature `heap`: `own<T>` and `own_array<T>` (linear owners, `T` a value type) and the built-in enum `alloc_error`. Feature `regions`: `region` (linear). Rules: spec 03 §18–§21. Linear values — resources, owners and regions — follow the consumption rules of spec 06 §6.2–§6.3.
### 8.10 Syntax of the feature `unsafe`
A function header may carry, after its `effects` line, a line `trusted "<obligation>"`. String literals exist only in this position: `"` … `"` with the escapes `\"`, `\\` and `\n`, no line breaks inside, not empty (`E0001`). Rules: spec 13 §6.
### 8.8 Types and syntax of the features `ownership` and `arrays`
Feature membership: `local<T>`, `ref<T>`, `mut<T>` and the `from` clause belong to `ownership`; `array<T, N>`, `slice<T>`, `slice_mut<T>` and multi-result binding belong to `arrays`. Using them without declaring the feature is `E0006` reason `feature_not_declared`.