diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2018-11-08 18:15:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-08 18:15:21 -0700 |
| commit | 667904f049febcb9df31e715144bf138dfe230f1 (patch) | |
| tree | d65b38d5ad5b2e71644a49842326d8b5e45163b5 /src/libstd | |
| parent | 686de87d2f67732750a87d706a7c1d123c36fc87 (diff) | |
| parent | d75dae306989369760eb20860a8a72eb4d15a18b (diff) | |
| download | rust-667904f049febcb9df31e715144bf138dfe230f1.tar.gz rust-667904f049febcb9df31e715144bf138dfe230f1.zip | |
Rollup merge of #55783 - stjepang:deprecate-select, r=SimonSapin
Deprecate mpsc channel selection Rationale: https://github.com/rust-lang/rust/issues/27800#issuecomment-421760863 r? @SimonSapin
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/mod.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/select.rs | 7 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 34bbbb53d5f..96c92ceb5bb 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -399,6 +399,8 @@ macro_rules! await { /// For more information about select, see the `std::sync::mpsc::Select` structure. #[macro_export] #[unstable(feature = "mpsc_select", issue = "27800")] +#[rustc_deprecated(since = "1.32.0", + reason = "channel selection will be removed in a future release")] macro_rules! select { ( $($name:pat = $rx:ident.$meth:ident() => $code:expr),+ diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 81f98a55c11..059ced4f56e 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -124,6 +124,7 @@ //! ``` #![stable(feature = "rust1", since = "1.0.0")] +#![allow(deprecated)] // for mpsc_select // A description of how Rust's channel implementation works // diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs index a7a284cfb79..2ec4b52dbf3 100644 --- a/src/libstd/sync/mpsc/select.rs +++ b/src/libstd/sync/mpsc/select.rs @@ -51,11 +51,10 @@ #![unstable(feature = "mpsc_select", reason = "This implementation, while likely sufficient, is unsafe and \ likely to be error prone. At some point in the future this \ - module will likely be replaced, and it is currently \ - unknown how much API breakage that will cause. The ability \ - to select over a number of channels will remain forever, \ - but no guarantees beyond this are being made", + module will be removed.", issue = "27800")] +#![rustc_deprecated(since = "1.32.0", + reason = "channel selection will be removed in a future release")] use fmt; |
