diff options
| author | Corey Richardson <corey@octayn.net> | 2013-12-06 12:11:28 -0500 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2013-12-10 09:43:36 -0500 |
| commit | 2750adb5d8eb37906a568b99755847c25fe5e59a (patch) | |
| tree | 64fb58ffa60725b21bd301eba990c7f5f1cd2b02 /doc/tutorial.md | |
| parent | 381c08bf69374c41d696b4892f4c06139289caca (diff) | |
| download | rust-2750adb5d8eb37906a568b99755847c25fe5e59a.tar.gz rust-2750adb5d8eb37906a568b99755847c25fe5e59a.zip | |
Inherited mutabilty clarification
Also no longer reference mutable fields
Diffstat (limited to 'doc/tutorial.md')
| -rw-r--r-- | doc/tutorial.md | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md index a430c6c72ec..7ddb63fd914 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -590,9 +590,8 @@ struct Point { } ~~~~ -Inherited mutability means that any field of a struct may be mutable, if the -struct is in a mutable slot (or a field of a struct in a mutable slot, and -so forth). +Structs have "inherited mutability", which means that any field of a struct +may be mutable, if the struct is in a mutable slot. With a value (say, `mypoint`) of such a type in a mutable location, you can do `mypoint.y += 1.0`. But in an immutable location, such an assignment to a |
