Skip to content

Commit b13e3ec

Browse files
committed
0000-let-else.md: Remove trailing whitespace
1 parent 952745b commit b13e3ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/0000-let-else.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ It is the natural counterpart to `if let`, just as `else` is to regular `if`.
2525
[if-let expressions][if-let] offer a succinct syntax for pattern matching single patterns.
2626
This is particularly useful for unwrapping types like `Option`, particularly those with a clear "success" variant
2727
for the given context but no specific "failure" variant.
28-
However, an if-let expression can only create bindings within its body, which can force
28+
However, an if-let expression can only create bindings within its body, which can force
2929
rightward drift, introduce excessive nesting, and separate conditionals from error paths.
3030

3131
let-else statements move the "failure" case into the body block, while allowing
@@ -200,9 +200,9 @@ let pattern = expr else {
200200
```
201201
desugars to
202202
```rust
203-
let (each, binding) = match expr {
203+
let (each, binding) = match expr {
204204
pattern => (each, binding),
205-
_ => {
205+
_ => {
206206
/* diverging expr */
207207
}
208208
};
@@ -262,7 +262,7 @@ let x = match y {
262262

263263
## The diverging block
264264

265-
"Must diverge" is an unusual requirement, which doesn't exist elsewhere in the language as of the time of writing,
265+
"Must diverge" is an unusual requirement, which doesn't exist elsewhere in the language as of the time of writing,
266266
and might be difficult to explain or lead to confusing errors for programmers new to this feature.
267267

268268
However, rustc does have support for representing the divergence through the type-checker via `!` or any other uninhabited type,

0 commit comments

Comments
 (0)