Skip to content

Commit c7182ba

Browse files
committed
Guide: minor clarifications for the Pointers part
1 parent 3a8f4ec commit c7182ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3463,7 +3463,7 @@ note: previous borrow ends here
34633463

34643464
This is a big error message. Let's dig into it for a moment. There are three
34653465
parts: the error and two notes. The error says what we expected, we cannot have
3466-
two pointers that point to the same memory.
3466+
two mutable pointers that point to the same memory.
34673467

34683468
The two notes give some extra context. Rust's error messages often contain this
34693469
kind of extra information when the error is complex. Rust is telling us two
@@ -3762,7 +3762,7 @@ value that must persist as long as any of several referrers, read on.
37623762

37633763
## Rc and Arc
37643764

3765-
Sometimes, you need a variable that is referenced from multiple places
3765+
Sometimes you need a variable that is referenced from multiple places
37663766
(immutably!), lasting as long as any of those places, and disappearing when it
37673767
is no longer referenced. For instance, in a graph-like data structure, a node
37683768
might be referenced from all of its neighbors. In this case, it is not possible
@@ -3858,7 +3858,7 @@ match x {
38583858
```
38593859

38603860
If you're matching on an enum which has variants, you can use `..` to
3861-
ignore the value in the variant:
3861+
ignore the value and type in the variant:
38623862

38633863
```{rust}
38643864
enum OptionalInt {

0 commit comments

Comments
 (0)