diff options
| author | bors <bors@rust-lang.org> | 2017-06-21 15:26:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-06-21 15:26:55 +0000 |
| commit | 622e7e6487b6fb7fdbb901720cd4214f9179ed67 (patch) | |
| tree | 051abe6de044e63838f39659bdeac430d11cf4ff /src/libstd | |
| parent | 39220a9d9febbf8df995501f4271ce3d664559dd (diff) | |
| parent | 80e14a0fe309e898e22fe9016a6e04dd16ba5f23 (diff) | |
| download | rust-622e7e6487b6fb7fdbb901720cd4214f9179ed67.tar.gz rust-622e7e6487b6fb7fdbb901720cd4214f9179ed67.zip | |
Auto merge of #42802 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests - Successful merges: #42397, #42620, #42762, #42766 - Failed merges:
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 10 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/mod.rs | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 496c014f70e..82c4f0830a6 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -238,6 +238,16 @@ macro_rules! assert_approx_eq { /// into libsyntax itself. #[cfg(dox)] pub mod builtin { + + /// Unconditionally causes compilation to fail with the given error message when encountered. + /// + /// For more information, see the [RFC]. + /// + /// [RFC]: https://github.com/rust-lang/rfcs/blob/master/text/1695-add-error-macro.md + #[unstable(feature = "compile_error_macro", issue = "40872")] + #[macro_export] + macro_rules! compile_error { ($msg:expr) => ({ /* compiler built-in */ }) } + /// The core macro for formatted string creation & output. /// /// This macro produces a value of type [`fmt::Arguments`]. This value can be diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 7d5e1929cd2..dcd4c8dfdf5 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -499,8 +499,6 @@ unsafe impl<T: Send> Send for Sender<T> { } impl<T> !Sync for Sender<T> { } /// The sending-half of Rust's synchronous [`sync_channel`] type. -/// This half can only be owned by one thread, but it can be cloned -/// to send to other threads. /// /// Messages can be sent through this channel with [`send`] or [`try_send`]. /// @@ -555,9 +553,6 @@ pub struct SyncSender<T> { #[stable(feature = "rust1", since = "1.0.0")] unsafe impl<T: Send> Send for SyncSender<T> {} -#[stable(feature = "rust1", since = "1.0.0")] -impl<T> !Sync for SyncSender<T> {} - /// An error returned from the [`Sender::send`] or [`SyncSender::send`] /// function on **channel**s. /// |
