Link to cell in TRPL: mutability

This commit is contained in:
Steve Klabnik 2015-06-02 09:37:54 -04:00
parent 48e9ef6404
commit e1a33aa987

View File

@ -159,7 +159,7 @@ b.x = 10; // error: cannot assign to immutable field `b.x`
[struct]: structs.html
However, by using `Cell<T>`, you can emulate field-level mutability:
However, by using [`Cell<T>`][cell], you can emulate field-level mutability:
```rust
use std::cell::Cell;
@ -176,4 +176,6 @@ point.y.set(7);
println!("y: {:?}", point.y);
```
[cell]: ../std/cell/struct.Cell.html
This will print `y: Cell { value: 7 }`. Weve successfully updated `y`.