File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -171,9 +171,9 @@ to the definition of a data race:
171
171
> operations are not synchronized.
172
172
173
173
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.
177
177
178
178
With this in mind, let’s consider our example again.
179
179
@@ -378,3 +378,4 @@ statement 1 at 3:14
378
378
379
379
In the above example, ` y ` is declared before ` x ` , meaning that ` y ` lives longer
380
380
than ` x ` , which is not allowed.
381
+
You can’t perform that action at this time.
0 commit comments