Skip to content

Commit

Permalink
Rollup merge of rust-lang#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#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 authored Dec 5, 2022
2 parents 2f5ef5c + c823dfa commit 48f8a92
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions library/std/src/sync/mpsc/mod.rs
Original file line number Diff line number Diff line change
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 48f8a92

Please sign in to comment.