Skip to content

Commit

Permalink
mutability fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Apr 14, 2015
1 parent 8b6987a commit 6476a1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/doc/trpl/structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ fn main() {

This will print `The point is at (5, 0)`.

Rust does not support mutability at the field level, so you cannot write
something like this:
Rust does not support field mutability at the language level, so you cannot
write something like this:

```rust,ignore
struct Point {
Expand All @@ -82,8 +82,8 @@ fn main() {
point.x = 5;
let point = point; // this new binding is immutable
let point = point; // this new binding can’t change now
point.y = 6; // this causes an error, because `point` is immutable!
point.y = 6; // this causes an error
}
```

0 comments on commit 6476a1e

Please sign in to comment.