Skip to content

Commit b73de2a

Browse files
authored
Merge pull request #1743 from meithecatte/patch-1
Closures: fix example of desugaring
2 parents 4e2e24b + dea47f4 commit b73de2a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/types/closure.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ so that the call to `f` works as if it were:
5454

5555
<!-- ignore: continuation of above -->
5656
```rust,ignore
57-
// Note: This is not valid Rust due to the duplicate mutable borrows.
58-
// This is only provided as an illustration.
59-
f(Closure{ left_top: &mut rect.left_top, right_bottom_x: &mut rect.left_top.x });
57+
f(Closure{ left_top: &mut rect.left_top, right_bottom_x: &mut rect.right_bottom.x });
6058
```
6159

6260
r[type.closure.capture]

0 commit comments

Comments
 (0)