]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sync/mpsc/mod.rs
Deprecate Error::description for real
[rust.git] / src / libstd / sync / mpsc / mod.rs
index 2831bbcb88d2e49e790f3f420b368a808263cb85..0e334c191e7b91feff84e4caec95fecde44dce54 100644 (file)
@@ -1550,6 +1550,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Send> error::Error for SendError<T> {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "sending on a closed channel"
     }
@@ -1577,6 +1578,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Send> error::Error for TrySendError<T> {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match *self {
             TrySendError::Full(..) => "sending on a full channel",
@@ -1603,6 +1605,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl error::Error for RecvError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         "receiving on a closed channel"
     }
@@ -1620,6 +1623,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl error::Error for TryRecvError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match *self {
             TryRecvError::Empty => "receiving on an empty channel",
@@ -1649,6 +1653,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 #[stable(feature = "mpsc_recv_timeout_error", since = "1.15.0")]
 impl error::Error for RecvTimeoutError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match *self {
             RecvTimeoutError::Timeout => "timed out waiting on channel",