Skip to content

Support For In Loop #15

@oovm

Description

@oovm
for i in [1, 2, 3] {
    print(i)
}

Equivalent to

let mut $iter = IntoIterator::into_iterator([1, 2, 3])
let mut $next = $iter.next()
while $next.is_some() {
    let i = $next!;
    do_something(i);
    $next = $iter.next()
}

Metadata

Metadata

Assignees

Labels

SyntaxSupport new syntax

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions