RangeIter
struct · Source line 27
pub struct RangeIter { cur: int, stop: int, }A half-open integer range [cur, stop) stepped by next.
wolf-std d58f9e1
· toolchain pin verified against wolf 0.2.41 (0261597).
Source signatures and documentation; execution support is stated in each module.
All modules · Plain text · Stability tier: x
std.iter — the iterator protocol, prototyped. Stability tier: x (this module is the working evidence for the F1 spec-amendment filing; it graduates or dies with the filing, D31 clock).
Today for over List/Pool/ranges is a sema builtin (s21) with no user-implementable iteration. The filed trait shape is Iter[T] with next(mut self) -> T ! {done} and a for desugar; these two monomorphic prototypes prove that shape's semantics execute — explicit loop/next driving, mut-receiver stepping, a row-tag end signal — before the spec moves. No for integration is faked.
INTERIM SPELLINGS, each part of the filing's evidence: - The end tag is done, which is the convention's own lowercase mark and no longer an interim (F-0003 died at the sc05 pins; the rename landed at sc06, and this line kept describing the interim in a sentence that contradicted itself until sc12). - next is a free function with an explicit mut first parameter, not a method: at the sc01 pins lupin executes no user methods (finding F-0002), and free functions collide across element sources — hence range_next/list_next. The collision IS evidence for the trait: one next, dispatched, is the fix (F1).
struct · Source line 27
pub struct RangeIter { cur: int, stop: int, }A half-open integer range [cur, stop) stepped by next.
struct · Source line 57
pub struct ListCursor { xs: List[int], i: int, }A cursor over an owned List[int], consumed at construction.
fn · Source line 41
pub fn range_iter(start: int, stop: int) -> RangeIterA fresh iterator over start..stop (half-open; empty when start >= stop). Total: no error row, no traps.
var it = iter.range_iter(7, 9)
(iter.range_next(mut it) else 0 - 1) == 7
(iter.range_next(mut it) else 0 - 1) == 8
(iter.range_next(mut it) else 0 - 1) == 0 - 1fn · Source line 49
pub fn range_next(mut it: RangeIter) -> int ! {done}The next element of the range, advancing the iterator; done when exhausted — the row is the end signal, consumed by else. No traps (checked arithmetic cannot overflow here: cur < stop bounds the increment).
fn · Source line 65
pub fn list_cursor(take xs: List[int]) -> ListCursorA fresh cursor over xs, which the cursor consumes (take — the caller is done with the list; X1 true consumption). Total: no error row, no traps.
fn · Source line 72
pub fn list_next(mut c: ListCursor) -> int ! {done}The next element of the list, advancing the cursor; done when exhausted — the row is the end signal, consumed by else. No traps (the index is bounds-guarded before the read).
No public declarations in this section.
Tags named by public signatures: done. Their conditions are documented on the functions that return them.
No public declarations in this section.