Skip to content

Commit f90aecf

Browse files
committed
Rollup merge of rust-lang#25963 - steveklabnik:link_to_cell, r=alexcrichton
2 parents 3fd41d6 + e1a33aa commit f90aecf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/doc/trpl/mutability.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ b.x = 10; // error: cannot assign to immutable field `b.x`
159159

160160
[struct]: structs.html
161161

162-
However, by using `Cell<T>`, you can emulate field-level mutability:
162+
However, by using [`Cell<T>`][cell], you can emulate field-level mutability:
163163

164164
```rust
165165
use std::cell::Cell;
@@ -176,4 +176,6 @@ point.y.set(7);
176176
println!("y: {:?}", point.y);
177177
```
178178

179+
[cell]: ../std/cell/struct.Cell.html
180+
179181
This will print `y: Cell { value: 7 }`. We’ve successfully updated `y`.

0 commit comments

Comments
 (0)