diff options
| author | bors <bors@rust-lang.org> | 2018-03-15 13:16:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-03-15 13:16:09 +0000 |
| commit | ff2d506c2c748bd218f74c6014abc4cecc8c74c4 (patch) | |
| tree | aed38048b055954674cf19b081f6e60bd05eb1e3 /src/libcore | |
| parent | a4af6f089b2836530f31b6b839bde7cea8ae0b8a (diff) | |
| parent | 1bbd4fd395b7b8f5f51f90401665168b19f0b9fd (diff) | |
| download | rust-ff2d506c2c748bd218f74c6014abc4cecc8c74c4.tar.gz rust-ff2d506c2c748bd218f74c6014abc4cecc8c74c4.zip | |
Auto merge of #48138 - estebank:issue-45092, r=nikomatsakis
Reword E0044 and message for `!Send` types - Reword E0044 help. - Change error message for types that don't implement `Send` CC #45092, #46678, #24909, #33307.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/marker.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 98e0f71eb93..53b1d1cd12d 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -343,8 +343,21 @@ pub trait Copy : Clone { /// [transmute]: ../../std/mem/fn.transmute.html #[stable(feature = "rust1", since = "1.0.0")] #[lang = "sync"] -#[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"] +#[rustc_on_unimplemented( + message="`{Self}` cannot be shared between threads safely", + label="`{Self}` cannot be shared between threads safely" +)] pub unsafe auto trait Sync { + // FIXME(estebank): once support to add notes in `rustc_on_unimplemented` + // lands in beta, and it has been extended to check whether a closure is + // anywhere in the requirement chain, extend it as such (#48534): + // ``` + // on( + // closure, + // note="`{Self}` cannot be shared safely, consider marking the closure `move`" + // ), + // ``` + // Empty } |
