Skip to content

Commit 8286075

Browse files
author
Tymoteusz Jankowski
committed
ci fix?
1 parent 3c53595 commit 8286075

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/libcore/cell.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,9 @@ use ops::{Deref, DerefMut, CoerceUnsized};
187187
use ptr;
188188

189189
/// A mutable memory location.
190-
///
191190
/// # Examples
192-
///
193191
/// Here you can see how using `Cell<T>` allows to use mutable field inside
194192
/// immutable struct (which is also called 'interior mutability').
195-
///
196193
/// ```
197194
/// use std::cell::Cell;
198195
///
@@ -207,10 +204,8 @@ use ptr;
207204
/// };
208205
///
209206
/// let new_value = 100;
210-
///
211207
/// // ERROR, because my_struct is immutable
212208
/// // immutable.regular_field = new_value;
213-
///
214209
/// // WORKS, although `my_struct` is immutable, field `special_field` is mutable because it is Cell
215210
/// immutable.special_field.set(new_value);
216211
/// assert_eq!(immutable.special_field.get(), new_value);

0 commit comments

Comments
 (0)