Skip to content

Commit

Permalink
Replace if with if and only if in the definition dox of Sync
Browse files Browse the repository at this point in the history
The old text was: "The precise definition is: a type T is Sync if &T is Send."

Since we've also got
```
impl<'a, T> Send for &'a T 
where
    T: Sync + ?Sized,
```
I purpose we can change the `if` to `if and only if` to make it more precise.
  • Loading branch information
crlf0710 authored May 29, 2018
1 parent fe5c45b commit 0d821db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ pub trait Copy : Clone {
/// This trait is automatically implemented when the compiler determines
/// it's appropriate.
///
/// The precise definition is: a type `T` is `Sync` if `&T` is
/// The precise definition is: a type `T` is `Sync` if and only if `&T` is
/// [`Send`][send]. In other words, if there is no possibility of
/// [undefined behavior][ub] (including data races) when passing
/// `&T` references between threads.
Expand Down

0 comments on commit 0d821db

Please sign in to comment.