rollup merge of #20102: tshepang/patch-4
That sentence made it look like there was no option for using 'mut'
This commit is contained in:
commit
941361b395
@ -1010,8 +1010,8 @@ in the original declaration.
|
||||
Finally, because fields have names, we can access the field through dot
|
||||
notation: `origin.x`.
|
||||
|
||||
The values in structs are immutable, like other bindings in Rust. However, you
|
||||
can use `mut` to make them mutable:
|
||||
The values in structs are immutable by default, like other bindings in Rust.
|
||||
Use `mut` to make them mutable:
|
||||
|
||||
```{rust}
|
||||
struct Point {
|
||||
|
Loading…
Reference in New Issue
Block a user