Skip to content

Commit b8e9bbf

Browse files
committed
auto merge of #16614 : cdwort/rust/pointer-guide-typo, r=steveklabnik
This appears to be a minor typo. This example implies that x is mutable otherwise the compiler would error on the line before the comment implies. Please let me know if I'm missing something - I'd love to learn what I got wrong!
2 parents 4be4ea7 + 0493fb2 commit b8e9bbf

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)