Result: done (part; skipped files and 3 gap sites remain, see Deviation)
Pushed: see commit
Tests: nikaia test –both-settings –project tests/compiler 304 ok, 1 FAILED a_for_mut_over_a_list_not_mut_is_refused (untracked test of the #951 builder, not mine); gate set 23 ok; clippy clean
Gate: green (own files)
Deviation: 153 of 158 insert loops became extend (47 files), 5 left in check_core_stmt, view_changes (3), emit_stmt: skipped files, not touched (view_changes 170,230,233; check_core_stmt 1266,1270; emit_stmt none matched by shape elsewhere). 3 loops stay in types.nika (known_traits SHAPE_BOUNDS, STANDARD_BOUNDS; known_names BUILT_IN): known.extend(CONST_ARRAY_OF_TEXT) passes the checker but rustc refuses it ([&str; N] items, expected String). Places (field, index) as extend source need .clone() (NK2105 otherwise); a loop over a place did not move it. entry: 5 sites converted (check_attributes counter, comptime_driver 162, emit_needs 169, fold_bound lambdas and names, number keys); the other contains_key-then-insert sites clone the key on the insert path only (ADR-collections-1 section 5) or have a compound condition (sharing 593, text_tiers 3991, throws 727), so they keep their form; check_core_call_on 834, 976 skipped. lib.rs: tools module allow list gained clippy::redundant_closure_call and unwrap_or_default (lowered and_modify closure; or_insert(BTreeSet::new())).
Found: GAP: extend of a const array of text literals lowers to Rust extend over [&str; N] into a set of String. Probe: const B: [String; 2] = ["a","b"] (as in types.nika) let mut s: collections::BTreeSet[String] = collections::BTreeSet(); s.extend(B) checks, rustc E0271. Needs: owner decision whether extend(array of text) should lower with to_string (a defect of D3)
Needs: fix of the extend(array of text) lowering; then the 3 types.nika loops; #951 files and check_core_call_on afterwards
Changelog: none (self-hosting rewrite, no version change)
Rs2nika: none (no move)