Result: done Files: crates/nikaia/src/contracts/keeps.rs crates/nikaia-std/src/tools/emit_item.nika crates/nikaia-std/src/tools/emit_misc.nika crates/nikaia-std/src/tools/lowered/check_arm_leaves.rs crates/nikaia-std/src/tools/lowered/check_consts.rs crates/nikaia-std/src/tools/lowered/check_expect.rs crates/nikaia-std/src/tools/lowered/emit_item.rs crates/nikaia-std/src/tools/lowered/emit_misc.rs crates/nikaia-std/src/tools/lowered/grammar_decode.rs crates/nikaia-std/src/tools/lowered/prover_state.rs assets/badges/self-hosted.svg tests/compiler/tests/a_trait_method_callback_borrows_when_no_impl_keeps.nika tests/compiler/tests/a_trait_method_callback_borrows_when_no_impl_keeps.stdout tests/compiler/tests/a_trait_method_keeps_when_one_impl_keeps.nika tests/compiler/tests/a_trait_method_keeps_when_one_impl_keeps.stdout tests/compiler/tests/a_trait_method_with_no_impl_runs.nika tests/compiler/tests/a_trait_method_with_no_impl_runs.stdout tests/compiler/tests/a_trait_method_relayed_between_impls_runs.nika tests/compiler/tests/a_trait_method_relayed_between_impls_runs.stdout tests/compiler/tests/a_method_hands_its_callback_to_a_function.nika tests/compiler/tests/a_method_hands_its_callback_to_a_function.stdout tests/compiler/tests/a_trait_column_does_not_depend_on_item_order.nika tests/compiler/tests/a_trait_column_does_not_depend_on_item_order.stdout tests/compiler/tests/a_library_trait_with_no_impl_runs.nika tests/compiler/tests/a_library_trait_with_no_impl_runs.stdout Commit: contracts: a trait method keeps what its package’s impls keep (#1012) Body: A trait method is a node of the kept_by fixpoint (ADR-277 D17): for each by-value fn parameter it hands the callback to every impl of it in the package, and each impl hands it back (the 0.0.1312 pre-pass, now an edge in the loop), so trait and impls are one SCC and settle on one column; with no impl, or a cycle nothing stores, the column is empty and the callback is lent. Data parameters keep the by-value seed until step 3. Trait methods have no default bodies in the AST (TraitMethod has none), so their own evidence is empty. The emitter needed two changes: emit_trait_method reads the trait method’s own column for a fn parameter (impl Fn and & where it runs, Kept where it keeps, an absent entry keeps) so the trait signature matches its impls; and a call to an own function lends a code parameter the way its declaration lends it (emit_arg_lends_own instead of emit_lends), which a method handing its lent callback to a free function otherwise re-lent (&known, rustc recursion limit; test a_method_hands_its_callback_to_a_function). That second change moves five lowered files that drop a needless & (check_arm_leaves, check_consts, check_expect, grammar_decode, prover_state). Built across two runs: the first was killed by the time limit after building and writing the tests; this run verified and committed it. Part: #1012 Pushed: 1c72e8b9 (pushed by drive.nika) Tests: tests/compiler –both-settings 386 passed 0 failed (all 8 new ones included); unfixed compiler (binary of 2026-10-30 23:24): (a) callback_borrows, (d) with_no_impl, (e) relayed, a_method_hands and (i) library_trait fail there; (b) keeps_when_one_impl and (c) is_handed_on print the same on both, as the brief expects; (f) item_order prints same on both (the old pre-pass was already order-independent, the test guards the new edges); it contracts + guard set 84 passed (sequences guard green); cargo test –lib contracts:: 36 passed; clippy clean; lower-std fixpoint clean Gate: green Deviation: none Found: none Needs: supervisor rebase and push of 0df2eefc (push rejected, develop moved) Changelog: A callback handed through a trait method borrows its captures when no impl in the trait’s package keeps it (ADR-277 D17). Owner: none Disk freed: 0.04 GB (two scratch copies of the binary); target/nikaia-project-tests 4.0G, no new entry over 100 MB; / has 4.5G free Rs2nika: none

This site is open source. Improve this page.