You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IntoIter.iter() is declared mut fn; spec §13 requires iter() on borrowed receivers #716
so shared.iter() through &Vec is rejected (§15.2), and iter() while any
shared view lives is a view-conflict — but iter() only constructs a read-only
VecIter { data_ptr, len, idx } view. Spec §13's implicit-iteration rule shows for item in my_vec.iter() as the explicit spelling of the borrowing form,
so expression-position iter() must work on borrowed/immutable receivers.
Changing the declarations to fn iter() alone breaks dispatch ("wrong
argument count" at call sites) — the builtin intercept/trait plumbing couples
to the mut receiver convention, so the fix needs the method-call path updated
together with the declarations. Tests currently spell around it
(issue64_borrowed_vec_methods iterates the owned var before creating views).
Eric ruling 2026-07-25: approved — fn iter() lands as §13.2 compliance ("the registered borrow on the receiver is shared") in its own isolated batch after the current batch's battery is recorded, per the receiver-mode blast-radius rule (alone, with :move-audit/:drop-audit). Work item: root-cause the trait-dispatch "wrong argument count" break that the direct receiver-mode flip exposed, then change the Vec impl, the IntoIter trait method, and the sibling collection iter() declarations together.
Resolved by evolution — verified on v0.15.1-geb0a0cf31. lib/std/collections.w now declares 'pub trait IntoIter[T]: fn iter(self: &Self) -> VecIter[T]' (shared receiver, not mut fn), and the spec §13 spellings all work: shared.iter() through a &Vec, 'for x in v.iter()', 'for y in ro.iter()' on an immutable binding, and IntoIter trait dispatch through a &C parameter. A neighbouring gap found while verifying — auto-ref not firing for a generic &C parameter, plus a misreported expected type in that diagnostic — is filed as #737.
Activity
ehartford commentedon Jul 25, 2026
Eric ruling 2026-07-25: approved —
fn iter()lands as §13.2 compliance ("the registered borrow on the receiver is shared") in its own isolated batch after the current batch's battery is recorded, per the receiver-mode blast-radius rule (alone, with :move-audit/:drop-audit). Work item: root-cause the trait-dispatch "wrong argument count" break that the direct receiver-mode flip exposed, then change the Vec impl, the IntoIter trait method, and the sibling collection iter() declarations together.ehartford commentedon Jul 27, 2026
Resolved by evolution — verified on v0.15.1-geb0a0cf31. lib/std/collections.w now declares 'pub trait IntoIter[T]: fn iter(self: &Self) -> VecIter[T]' (shared receiver, not mut fn), and the spec §13 spellings all work: shared.iter() through a &Vec, 'for x in v.iter()', 'for y in ro.iter()' on an immutable binding, and IntoIter trait dispatch through a &C parameter. A neighbouring gap found while verifying — auto-ref not firing for a generic &C parameter, plus a misreported expected type in that diagnostic — is filed as #737.
handoff: record the Stage 6 batch — 19 roots, evidence, and open rulings
stdlib: IntoIter constructs by shared borrow (§13.2, #716)
D22: fix the three remaining spec-lane regressions (ss10_5, ss13_3, s…