about summary refs log tree commit diff
path: root/library/std/src/sync
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-06 13:27:42 +0100
committerGitHub <noreply@github.com>2022-12-06 13:27:42 +0100
commit7d8e32919448d30d5d2281b29bf119f917bf583b (patch)
tree13eb785285d76aaab38f6ce17ffaabfb07ac7401 /library/std/src/sync
parent48172ff64b17b3e927e97af0b1f19a8754cade83 (diff)
parentc823dfa8b2f1b0cfb82d253e6d55efd6927bcb6d (diff)
downloadrust-7d8e32919448d30d5d2281b29bf119f917bf583b.tar.gz
rust-7d8e32919448d30d5d2281b29bf119f917bf583b.zip
Rollup merge of #105243 - RalfJung:no-op-let, r=Mark-Simulacrum
remove no-op 'let _ = '

Also see the discussion at https://github.com/rust-lang/rust/pull/93563#discussion_r1034057555.

I don't know why these `Drop` implementations exist to begin with, given that their body does literally nothing, but did not want to change that. (It might affect dropck.)

Cc `````@ibraheemdev````` `````@Amanieu`````
Diffstat (limited to 'library/std/src/sync')
-rw-r--r--library/std/src/sync/mpsc/mod.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/library/std/src/sync/mpsc/mod.rs b/library/std/src/sync/mpsc/mod.rs
index 27fba761ada..adb488d4378 100644
--- a/library/std/src/sync/mpsc/mod.rs
+++ b/library/std/src/sync/mpsc/mod.rs
@@ -629,9 +629,7 @@ impl<T> Clone for Sender<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Drop for Sender<T> {
-    fn drop(&mut self) {
-        let _ = self.inner;
-    }
+    fn drop(&mut self) {}
 }
 
 #[stable(feature = "mpsc_debug", since = "1.8.0")]
@@ -751,9 +749,7 @@ impl<T> Clone for SyncSender<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Drop for SyncSender<T> {
-    fn drop(&mut self) {
-        let _ = self.inner;
-    }
+    fn drop(&mut self) {}
 }
 
 #[stable(feature = "mpsc_debug", since = "1.8.0")]
@@ -1094,9 +1090,7 @@ impl<T> IntoIterator for Receiver<T> {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Drop for Receiver<T> {
-    fn drop(&mut self) {
-        let _ = self.inner;
-    }
+    fn drop(&mut self) {}
 }
 
 #[stable(feature = "mpsc_debug", since = "1.8.0")]