Deprecate channel selection

This commit is contained in:
Stjepan Glavina 2018-11-08 14:20:45 +01:00 committed by Simon Sapin
parent 653da4fd00
commit d75dae3069
4 changed files with 7 additions and 4 deletions

View File

@ -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),+

View File

@ -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
//

View File

@ -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;

View File

@ -16,6 +16,7 @@
// expose is still present.
#![feature(mpsc_select)]
#![allow(deprecated)]
use std::sync::mpsc::{channel, Sender, Receiver};
use std::thread;