File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ use crate::hash::Hasher;
24
24
/// operations. Its cousin [`sync::Arc`][arc] does use atomic operations (incurring
25
25
/// some overhead) and thus is `Send`.
26
26
///
27
- /// See [the Nomicon](../../nomicon/send-and-sync.html) for more details.
27
+ /// See [the Nomicon](../../nomicon/send-and-sync.html) and the [`Sync`] trait for more details.
28
28
///
29
29
/// [`Rc`]: ../../std/rc/struct.Rc.html
30
30
/// [arc]: ../../std/sync/struct.Arc.html
@@ -426,6 +426,11 @@ pub macro Copy($item:item) {
426
426
/// becomes read-only, as if it were a `& &T`. Hence there is no risk
427
427
/// of a data race.
428
428
///
429
+ /// A shorter overview of how [`Sync`] and [`Send`] relate to referencing:
430
+ /// * `&T` is [`Send`] if and only if `T` is [`Sync`]
431
+ /// * `&mut T` is [`Send`] if and only if `T` is [`Send`]
432
+ /// * `&T` and `&mut T` are [`Sync`] if and only if `T` is [`Sync`]
433
+ ///
429
434
/// Types that are not `Sync` are those that have "interior
430
435
/// mutability" in a non-thread-safe form, such as [`Cell`][cell]
431
436
/// and [`RefCell`][refcell]. These types allow for mutation of
You can’t perform that action at this time.
0 commit comments