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.
1 parent 5e826a0 commit 486ac8aCopy full SHA for 486ac8a
text/3637-guard-patterns.md
@@ -105,12 +105,12 @@ Therefore guard patterns appearing at the top level in those places must also be
105
106
```rust
107
// Not allowed:
108
-let x if guard(x) = foo() {}
+let x if guard(x) = foo() {} else { loop {} }
109
if let x if guard(x) = foo() {}
110
while let x if guard(x) = foo() {}
111
112
// Allowed:
113
-let (x if guard(x)) = foo() {} // Note that this would still error after parsing, since guard patterns are always refutable.
+let (x if guard(x)) = foo() {} else { loop {} }
114
if let (x if guard(x)) = foo() {}
115
while let (x if guard(x)) = foo() {}
116
```
0 commit comments