Make variable mutable to allow mutable reference

This commit is contained in:
Amy Unger 2014-08-19 15:41:12 -05:00
parent 3f5d0b5b6c
commit 0493fb2cfc

View file

@ -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
```