Make variable mutable to allow mutable reference
This commit is contained in:
parent
3f5d0b5b6c
commit
0493fb2cfc
@ -332,7 +332,7 @@ let z = &x;
|
||||
Mutable ones, however, are not:
|
||||
|
||||
```{rust,ignore}
|
||||
let x = 5i;
|
||||
let mut x = 5i;
|
||||
let y = &mut x;
|
||||
let z = &mut x; // error: cannot borrow `x` as mutable more than once at a time
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user