Skip to content

Commit 3042fed

Browse files
committed
Auto merge of #29805 - norcalli:patch-1, r=steveklabnik
Fixes #29730
2 parents 57c8a3e + 7b9b9df commit 3042fed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/doc/trpl/references-and-borrowing.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ to the definition of a data race:
171171
> operations are not synchronized.
172172
173173
With references, you may have as many as you’d like, since none of them are
174-
writing. If you are writing, you need two or more pointers to the same memory,
175-
and you can only have one `&mut` at a time. This is how Rust prevents data
176-
races at compile time: we’ll get errors if we break the rules.
174+
writing. However, as we can only have one `&mut` at a time, it is impossible to
175+
have a data race. This is how Rust prevents data races at compile time: we’ll
176+
get errors if we break the rules.
177177

178178
With this in mind, let’s consider our example again.
179179

@@ -378,3 +378,4 @@ statement 1 at 3:14
378378

379379
In the above example, `y` is declared before `x`, meaning that `y` lives longer
380380
than `x`, which is not allowed.
381+

0 commit comments

Comments
 (0)