Diagnostics: borrow-return-not-permitted + consume-while-borrowed should name the fix #59

Open
opened 2026-06-02 00:46:37 +02:00 by Brummel · 0 comments
Owner

Fieldtest finding from the #55 cutover (docs/specs/0065). The reject diagnostics explain the WHY but do not name the FIX:

  • borrow-return-not-permitted — should point at (own ...) + clone to return a projection (the cut55_4b escape hatch).
  • consume-while-borrowed — should point at annotating the param (own ...) when the body genuinely consumes it.

The cut55 cutover-surface corpus test (crates/ail/tests/cut55_cutover_surface.rs) asserts on diagnostic CODES, not message text, so this can land without touching the corpus. Improves the LLM-author feedback loop (feature-acceptance: a diagnostic that names the fix measurably shortens the author's correction path).

context: surfaced by the #55 fieldtest; decoupled from the corpus test by design.

Fieldtest finding from the #55 cutover (docs/specs/0065). The reject diagnostics explain the WHY but do not name the FIX: - `borrow-return-not-permitted` — should point at `(own ...)` + `clone` to return a projection (the cut55_4b escape hatch). - `consume-while-borrowed` — should point at annotating the param `(own ...)` when the body genuinely consumes it. The cut55 cutover-surface corpus test (crates/ail/tests/cut55_cutover_surface.rs) asserts on diagnostic CODES, not message text, so this can land without touching the corpus. Improves the LLM-author feedback loop (feature-acceptance: a diagnostic that names the fix measurably shortens the author's correction path). context: surfaced by the #55 fieldtest; decoupled from the corpus test by design.
Brummel added the feature label 2026-06-02 00:46:37 +02:00
Sign in to join this conversation.