Skip to content

Commit 053bfdd

Browse files
committed
Simplify for loop desugar
1 parent 7ae64b4 commit 053bfdd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

std/src/keyword_docs.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,13 +549,10 @@ mod fn_keyword {}
549549
/// {
550550
/// let result = match IntoIterator::into_iter(iterator) {
551551
/// mut iter => loop {
552-
/// let next;
553552
/// match iter.next() {
554-
/// Some(val) => next = val,
555553
/// None => break,
554+
/// Some(loop_variable) => { code(); },
556555
/// };
557-
/// let loop_variable = next;
558-
/// let () = { code(); };
559556
/// },
560557
/// };
561558
/// result

0 commit comments

Comments
 (0)