Skip to content

Commit 4ba15b2

Browse files
authored
Rollup merge of rust-lang#105243 - RalfJung:no-op-let, r=Mark-Simulacrum
remove no-op 'let _ = ' Also see the discussion at rust-lang#93563 (comment). 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``
2 parents d8ca0a6 + c823dfa commit 4ba15b2

File tree

1 file changed

+3
-9
lines changed
  • library/std/src/sync/mpsc

1 file changed

+3
-9
lines changed

library/std/src/sync/mpsc/mod.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,7 @@ impl<T> Clone for Sender<T> {
629629

630630
#[stable(feature = "rust1", since = "1.0.0")]
631631
impl<T> Drop for Sender<T> {
632-
fn drop(&mut self) {
633-
let _ = self.inner;
634-
}
632+
fn drop(&mut self) {}
635633
}
636634

637635
#[stable(feature = "mpsc_debug", since = "1.8.0")]
@@ -751,9 +749,7 @@ impl<T> Clone for SyncSender<T> {
751749

752750
#[stable(feature = "rust1", since = "1.0.0")]
753751
impl<T> Drop for SyncSender<T> {
754-
fn drop(&mut self) {
755-
let _ = self.inner;
756-
}
752+
fn drop(&mut self) {}
757753
}
758754

759755
#[stable(feature = "mpsc_debug", since = "1.8.0")]
@@ -1094,9 +1090,7 @@ impl<T> IntoIterator for Receiver<T> {
10941090

10951091
#[stable(feature = "rust1", since = "1.0.0")]
10961092
impl<T> Drop for Receiver<T> {
1097-
fn drop(&mut self) {
1098-
let _ = self.inner;
1099-
}
1093+
fn drop(&mut self) {}
11001094
}
11011095

11021096
#[stable(feature = "mpsc_debug", since = "1.8.0")]

0 commit comments

Comments
 (0)