Skip to content

Commit 63b5080

Browse files
committed
Do not use "bind" to refer to referencing and to variable binding.
1 parent ccc7e95 commit 63b5080

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/doc/book/mutability.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,16 @@ changed from one `i32` to another.
2424

2525
[vb]: variable-bindings.html
2626

27-
If you want to change what the binding points to, you’ll need a [mutable reference][mr]:
27+
You can also create a [reference][ref] to it, using `&x`, but if you want to use the reference to change it, you will need a mutable reference:
2828

2929
```rust
3030
let mut x = 5;
3131
let y = &mut x;
3232
```
3333

34-
[mr]: references-and-borrowing.html
34+
[ref]: references-and-borrowing.html
3535

36-
`y` is an immutable binding to a mutable reference, which means that you can’t
37-
bind `y` to something else (`y = &mut z`), but you can mutate the thing that’s
38-
bound to `y` (`*y = 5`). A subtle distinction.
36+
`y` is an immutable binding to a mutable reference, which means that you can’t bind 'y' to something else (`y = &mut z`), but `y` can be used to bind `x` to something else (`*y = 5`). A subtle distinction.
3937

4038
Of course, if you need both:
4139

0 commit comments

Comments
 (0)