We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
while let
1 parent ffb3570 commit e909a9dCopy full SHA for e909a9d
active/0000-while-let.md
@@ -73,6 +73,12 @@ be.
73
As with `if let`, this could plausibly be done with a macro, but it would be ugly and produce bad
74
error messages.
75
76
+`while let` could be extended to support alternative patterns, just as match arms do. This is not
77
+part of the main proposal for the same reason it was left out of `if let`, which is that a) it looks
78
+weird, and b) it's a bit of an odd coupling with the `let` keyword as alternatives like this aren't
79
+going to be introducing variable bindings. However, it would make `while let` more general and able
80
+to replace more instances of `loop { match { ... } }` than is possible with the main design.
81
+
82
# Unresolved questions
83
84
None.
0 commit comments