From 8e90a2d02f4d90409dcd65a8e54b76f1edcba42c Mon Sep 17 00:00:00 2001 From: CrLF0710 Date: Tue, 29 May 2018 15:58:50 +0800 Subject: [PATCH] Replace `if` with `if and only if` in the definition dox of `Sync` 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. --- src/libcore/marker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 77db165bcbde3..3d3f63ecf37d5 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -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.