agent: builder model: sonnet max_turns: 100 budget_usd: 20 —

Brief: #655 step 5, a view result of a function with two ref parameters lowers with its lifetime

Score: bugs lane (docs/priorities.md): the checker passes code rustc refuses (a program dies in rustc); last step of #655, so this commit says Fixes #655.

Issue text (#655, item 4, step 5)

A function with two ref parameters that returns ref E? passes the checker, then rustc reports a missing lifetime. To build 5: lowered with the right lifetime, or refused per ADR-353. Test. Decided: ADR-353 D1/D2 (docs/specification/adr/adr-353.md): each view a result holds has its own sources, which the compiler reads off the body; where the body chooses at run time, the view points into the union. Nobody writes a lifetime (Part I 6.5). So: lower, do not refuse: one lifetime 'a on the parameters the result views (all the sources the body returns from), none on the others.

Probes (architect ran them on b9aa489’s binary, struct E { n: i64 })

Locations

Done when

(a)-(c) print as stated, (d) unchanged; nikaia test tests/compiler --both-settings; it filters lifetime, views_kept, element_views, view_result. Commit A view result of two ref parameters is lowered with their lifetime (Fixes #655). Changelog line: yes.

Stop and report if

The sources are not known at the lowering (the ledger does not carry them for a private function): Result: blocked with the probe, no refusal built instead.

Read docs/builder-facts.md.

Rules (CLAUDE.md; this block is pasted into every brief, also a fix-forward)

Report (at most 15 lines, to exactly /home/user/Nikaia/docs/briefs/b655-two-ref-lifetime.md.report.md)

Fields of docs/architect.md, Briefs and reports: Result: done|noop|partial|blocked (the bare word first; Owner: is a question for the owner or none, never a role), Files, Commit, Fixes, Pushed, Tests, Gate (green|red), Deviation, Found, Needs, Changelog, Owner, Disk freed. none where nothing, and then the bare word: Deviation: none (a note) cuts the batch (batch.nika compares exactly); a note goes into the commit message. Found: is only for a defect outside your change (it cuts the batch); how you solved your own step goes into the commit message. Deviation: is only a step of the brief built otherwise than written or not built (a choice the brief left to you, such as keep what X needs and say so, is no deviation: it goes into the commit message); how you verified (e.g. a test not run against the unfixed compiler) goes under Tests:. A noop says why under Tests: (what was probed), not under Deviation:. Final answer, one line: done <sha>, report <path> (or BLOCKED: ... / PUSH REJECTED ...).

Attribution: Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01GFeMqxRbtUMiGVyDMxsvEq

This site is open source. Improve this page.