Skip to content

Commit 6476a1e

Browse files
committed
mutability fixes
1 parent 8b6987a commit 6476a1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/doc/trpl/structs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ fn main() {
5555

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

58-
Rust does not support mutability at the field level, so you cannot write
59-
something like this:
58+
Rust does not support field mutability at the language level, so you cannot
59+
write something like this:
6060

6161
```rust,ignore
6262
struct Point {
@@ -82,8 +82,8 @@ fn main() {
8282
8383
point.x = 5;
8484
85-
let point = point; // this new binding is immutable
85+
let point = point; // this new binding can’t change now
8686
87-
point.y = 6; // this causes an error, because `point` is immutable!
87+
point.y = 6; // this causes an error
8888
}
8989
```

0 commit comments

Comments
 (0)