Skip to content

Commit

Permalink
Merge pull request #1743 from meithecatte/patch-1
Browse files Browse the repository at this point in the history
Closures: fix example of desugaring
  • Loading branch information
ehuss authored Feb 25, 2025
2 parents 4e2e24b + dea47f4 commit b73de2a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/types/closure.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ so that the call to `f` works as if it were:

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

r[type.closure.capture]
Expand Down

0 comments on commit b73de2a

Please sign in to comment.