diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-06-03 14:46:40 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-06-03 14:46:40 +0530 |
| commit | f90aecff7623c651aeafbd3bee7f04efc32a2738 (patch) | |
| tree | 5f2dd9fe732e007a915429d38f01aeba116c8665 | |
| parent | 3fd41d61abba6df2d454c0a94f8f86ed14a4ba00 (diff) | |
| parent | e1a33aa98758252c806d0bf1966690fe6c96291b (diff) | |
| download | rust-f90aecff7623c651aeafbd3bee7f04efc32a2738.tar.gz rust-f90aecff7623c651aeafbd3bee7f04efc32a2738.zip | |
Rollup merge of #25963 - steveklabnik:link_to_cell, r=alexcrichton
| -rw-r--r-- | src/doc/trpl/mutability.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/doc/trpl/mutability.md b/src/doc/trpl/mutability.md index e30825badcc..ef569a09e21 100644 --- a/src/doc/trpl/mutability.md +++ b/src/doc/trpl/mutability.md @@ -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 }`. We’ve successfully updated `y`. |
