aboutsummaryrefslogtreecommitdiff
path: root/src/sync/mpsc/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sync/mpsc/error.rs')
-rw-r--r--src/sync/mpsc/error.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sync/mpsc/error.rs b/src/sync/mpsc/error.rs
index a2d2824..0d25ad3 100644
--- a/src/sync/mpsc/error.rs
+++ b/src/sync/mpsc/error.rs
@@ -55,14 +55,18 @@ impl<T> From<SendError<T>> for TrySendError<T> {
/// Error returned by `Receiver`.
#[derive(Debug)]
+#[doc(hidden)]
+#[deprecated(note = "This type is unused because recv returns an Option.")]
pub struct RecvError(());
+#[allow(deprecated)]
impl fmt::Display for RecvError {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(fmt, "channel closed")
}
}
+#[allow(deprecated)]
impl Error for RecvError {}
cfg_time! {