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

+1 -1
View File
@@ -154,7 +154,7 @@ In a module that declares `effects`:
**Indirect calls (normative for future features).** When function values are introduced, the effect set MUST be part of the function type, for example `fnptr<(u8) -> void effects [io.write]>`, and an indirect call is checked against that set exactly like a direct call. Otherwise dynamic calls would break transitivity.
There is **no effect discharge** in format 0: no construct removes an effect from what a caller must declare. A later feature may introduce a discharging boundary only by specifying it explicitly (Q-011).
There is **no effect discharge** in format 0 except one: a `trusted` function (feature `unsafe`, spec 13 §6.3) discharges the effect `unsafe`. No other construct removes an effect from what a caller must declare; a later feature may introduce another discharging boundary only by specifying it explicitly (Q-011).
In a module that does not declare `effects`, `effects [...]` lists are recorded and not checked ([`../reference/air-features.md`](../reference/air-features.md)). Such a module cannot contain an effectful operation, because every intrinsic belongs to `capabilities`, which depends on `effects`.