Skip to content

Commit 117c5b5

Browse files
authored
Adhere to master branch's style to avoid unnecessary diff noise.
1 parent a341cb4 commit 117c5b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/types/closure.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ let z = &x;
461461
```
462462

463463
In this case, borrowing `x` mutably is not possible, because `x` is not `mut`.
464-
But at the same time, borrowing `x` immutably would make the assignment illegal, because a `& &mut` reference might not be unique, so it cannot safely be used to modify a value.
464+
But at the same time, borrowing `x` immutably would make the assignment illegal,
465+
because a `& &mut` reference might not be unique, so it cannot safely be used to modify a value.
465466
So a unique immutable borrow is used: it borrows `x` immutably, but like a mutable borrow, it must be unique.
466467

467468
In the above example, uncommenting the declaration of `y` will produce an error because it would violate the uniqueness of the closure's borrow of `x`; the declaration of `z` is valid because the closure's lifetime has expired, i.e. there are no `c` calls after `z`, releasing the borrow.

0 commit comments

Comments
 (0)