Skip to content

Commit 0493fb2

Browse files
committed
Make variable mutable to allow mutable reference
1 parent 3f5d0b5 commit 0493fb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/guide-pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ let z = &x;
332332
Mutable ones, however, are not:
333333

334334
```{rust,ignore}
335-
let x = 5i;
335+
let mut x = 5i;
336336
let y = &mut x;
337337
let z = &mut x; // error: cannot borrow `x` as mutable more than once at a time
338338
```

0 commit comments

Comments
 (0)