Skip to content

Commit d75dae3

Browse files
Stjepan GlavinaSimonSapin
Stjepan Glavina
authored andcommitted
Deprecate channel selection
1 parent 653da4f commit d75dae3

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Diff for: src/libstd/macros.rs

+2
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ macro_rules! await {
399399
/// For more information about select, see the `std::sync::mpsc::Select` structure.
400400
#[macro_export]
401401
#[unstable(feature = "mpsc_select", issue = "27800")]
402+
#[rustc_deprecated(since = "1.32.0",
403+
reason = "channel selection will be removed in a future release")]
402404
macro_rules! select {
403405
(
404406
$($name:pat = $rx:ident.$meth:ident() => $code:expr),+

Diff for: src/libstd/sync/mpsc/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
//! ```
125125
126126
#![stable(feature = "rust1", since = "1.0.0")]
127+
#![allow(deprecated)] // for mpsc_select
127128

128129
// A description of how Rust's channel implementation works
129130
//

Diff for: src/libstd/sync/mpsc/select.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@
5151
#![unstable(feature = "mpsc_select",
5252
reason = "This implementation, while likely sufficient, is unsafe and \
5353
likely to be error prone. At some point in the future this \
54-
module will likely be replaced, and it is currently \
55-
unknown how much API breakage that will cause. The ability \
56-
to select over a number of channels will remain forever, \
57-
but no guarantees beyond this are being made",
54+
module will be removed.",
5855
issue = "27800")]
56+
#![rustc_deprecated(since = "1.32.0",
57+
reason = "channel selection will be removed in a future release")]
5958

6059

6160
use fmt;

Diff for: src/test/run-pass/issues/issue-13494.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// expose is still present.
1717

1818
#![feature(mpsc_select)]
19+
#![allow(deprecated)]
1920

2021
use std::sync::mpsc::{channel, Sender, Receiver};
2122
use std::thread;

0 commit comments

Comments
 (0)