Skip to content

Commit

Permalink
races: Clarify a “mostly” that might be misread
Browse files Browse the repository at this point in the history
One might carelessly misread a sentence that begins “data races
are *mostly* prevented” as suggesting that Rust fails to prevent some
data races.  Clarify the intended reading.

Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk committed Oct 28, 2024
1 parent 456b904 commit bb6b27a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/races.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Safe Rust guarantees an absence of data races, which are defined as:
* one or more of them is unsynchronized

A data race has Undefined Behavior, and is therefore impossible to perform in
Safe Rust. Data races are *mostly* prevented through Rust's ownership system:
Safe Rust. Data races are prevented *mostly* through Rust's ownership system alone:
it's impossible to alias a mutable reference, so it's impossible to perform a
data race. Interior mutability makes this more complicated, which is largely why
we have the Send and Sync traits (see the next section for more on this).
Expand Down

0 comments on commit bb6b27a

Please sign in to comment.