Skip to content

Commit

Permalink
Deprecate channel selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Stjepan Glavina authored and SimonSapin committed Nov 8, 2018
1 parent 653da4f commit d75dae3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/libstd/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),+
Expand Down
1 change: 1 addition & 0 deletions src/libstd/sync/mpsc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down
7 changes: 3 additions & 4 deletions src/libstd/sync/mpsc/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issues/issue-13494.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// expose is still present.

#![feature(mpsc_select)]
#![allow(deprecated)]

use std::sync::mpsc::{channel, Sender, Receiver};
use std::thread;
Expand Down

0 comments on commit d75dae3

Please sign in to comment.