diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 34bbbb53d5ff1..96c92ceb5bb41 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 81f98a55c1171..059ced4f56efd 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 a7a284cfb7994..2ec4b52dbf3cb 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; diff --git a/src/test/run-pass/issues/issue-13494.rs b/src/test/run-pass/issues/issue-13494.rs index 0750a4c895936..a31ad72b0881a 100644 --- a/src/test/run-pass/issues/issue-13494.rs +++ b/src/test/run-pass/issues/issue-13494.rs @@ -16,6 +16,7 @@ // expose is still present. #![feature(mpsc_select)] +#![allow(deprecated)] use std::sync::mpsc::{channel, Sender, Receiver}; use std::thread;