Skip to content

Commit ff3ebfa

Browse files
committed
Mention that Sync/Send are automatically derived
Fixes rust-lang#28581
1 parent 191ff2d commit ff3ebfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcore/marker.rs

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ use hash::Hash;
2424
use hash::Hasher;
2525

2626
/// Types that can be transferred across thread boundaries.
27+
///
28+
/// This trait is automatically derived when the compiler determines it's appropriate.
2729
#[stable(feature = "rust1", since = "1.0.0")]
2830
#[lang = "send"]
2931
#[rustc_on_unimplemented = "`{Self}` cannot be sent between threads safely"]
@@ -219,6 +221,8 @@ pub trait Copy : Clone {
219221
/// wrapper around the value(s) which can be mutated when behind a `&`
220222
/// reference; not doing this is undefined behavior (for example,
221223
/// `transmute`-ing from `&T` to `&mut T` is invalid).
224+
///
225+
/// This trait is automatically derived when the compiler determines it's appropriate.
222226
#[stable(feature = "rust1", since = "1.0.0")]
223227
#[lang = "sync"]
224228
#[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"]

0 commit comments

Comments
 (0)