Skip to content

Commit

Permalink
Rollup merge of #105243 - RalfJung:no-op-let, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
remove no-op 'let _ = '

Also see the discussion at rust-lang/rust#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`````
  • Loading branch information
matthiaskrgr committed Dec 6, 2022
2 parents cf57758 + f81f605 commit 1c6d709
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions std/src/sync/mpsc/mod.rs
Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down

0 comments on commit 1c6d709

Please sign in to comment.