Skip to content

Commit 2750adb

Browse files
committed
Inherited mutabilty clarification
Also no longer reference mutable fields
1 parent 381c08b commit 2750adb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

doc/tutorial.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,8 @@ struct Point {
590590
}
591591
~~~~
592592

593-
Inherited mutability means that any field of a struct may be mutable, if the
594-
struct is in a mutable slot (or a field of a struct in a mutable slot, and
595-
so forth).
593+
Structs have "inherited mutability", which means that any field of a struct
594+
may be mutable, if the struct is in a mutable slot.
596595

597596
With a value (say, `mypoint`) of such a type in a mutable location, you can do
598597
`mypoint.y += 1.0`. But in an immutable location, such an assignment to a

0 commit comments

Comments
 (0)