We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beb072a commit d429a4eCopy full SHA for d429a4e
src/libcore/cell.rs
@@ -209,11 +209,11 @@ use ptr;
209
/// let new_value = 100;
210
///
211
/// // ERROR, because my_struct is immutable
212
-/// // immutable.regular_field = new_value;
+/// // my_struct.regular_field = new_value;
213
214
/// // WORKS, although `my_struct` is immutable, field `special_field` is mutable because it is Cell
215
-/// immutable.special_field.set(new_value);
216
-/// assert_eq!(immutable.special_field.get(), new_value);
+/// my_struct.special_field.set(new_value);
+/// assert_eq!(my_struct.special_field.get(), new_value);
217
/// ```
218
219
/// See the [module-level documentation](index.html) for more.
0 commit comments