Skip to content

Commit 9168034

Browse files
authored
make the while let loop terminate
1 parent 01fbeb5 commit 9168034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/unstable-book/src/language-features/irrefutable-let-patterns.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ fn main() {
2323
// These two examples used to be errors, but now they
2424
// trigger a lint (that is allowed):
2525
if let _ = 5 {}
26-
while let _ = 5 {}
26+
while let _ = 5 { break; }
2727
}
2828
```

0 commit comments

Comments
 (0)