Rollup merge of #25963 - steveklabnik:link_to_cell, r=alexcrichton

This commit is contained in:
Manish Goregaokar 2015-06-03 14:46:40 +05:30
commit f90aecff76

View File

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