-
Notifications
You must be signed in to change notification settings - Fork 13.3k
remove no-op 'let _ = ' #105243
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
remove no-op 'let _ = ' #105243
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
I think we can remove these drop impls entirely. Any dropck requirements are handled by the inner drop. |
The one concern raised by @ibraheemdev is that this is technically a breaking change -- in case anyone relied on |
If you're relying on |
There is: |
r=me, but no opinion on whether to remove the Drop impls too. It does seem relatively harmless. |
All right, I have removed the empty drop impls. @bors r=Mark-Simulacrum |
📌 Commit 9e05798e24e46f9c3c9f7f27d75d388497a27078 has been approved by It is now in the queue for this repository. |
This comment has been minimized.
This comment has been minimized.
@bors r- |
Turns out this actually makes some test fail... I guess not then. ;) |
@bors 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`
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``
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```
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````
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#104439 (Add prototype to generate `COPYRIGHT` from REUSE metadata) - rust-lang#105005 (On E0195 point at where clause lifetime bounds) - rust-lang#105098 (propagate the error from parsing enum variant to the parser and emit out) - rust-lang#105243 (remove no-op 'let _ = ') - rust-lang#105254 (Recurse into nested impl-trait when computing variance.) - rust-lang#105287 (Synthesize substitutions for bad auto traits in dyn types) - rust-lang#105310 (Be more careful about unresolved exprs in suggestion) - rust-lang#105318 (Make `get_impl_future_output_ty` work with AFIT) - rust-lang#105339 (support `ConstKind::Expr` in `is_const_evaluatable` and `WfPredicates::compute`) - rust-lang#105340 (Avoid ICE by accounting for missing type) - rust-lang#105342 (Make `note_obligation_cause_code` take a `impl ToPredicate` for predicate) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Remove Drop impl of mpsc Receiver and (Sync)Sender This change removes the empty `Drop` implementations for `mpsc::Receiver`, `mpsc::Sender` and `mpsc::SyncSender`. These implementations do not specify `#[may_dangle]`, so by removing them we make `mpsc` types play nice with drop check. This was previously attempted in [rust-lang#105243](rust-lang#105243 (comment)) but then [abandoned due to a test failure](rust-lang#105243 (comment)). I've aligned the test with those for `Mutex` and `RwLock`.
Remove Drop impl of mpsc Receiver and (Sync)Sender This change removes the empty `Drop` implementations for `mpsc::Receiver`, `mpsc::Sender` and `mpsc::SyncSender`. These implementations do not specify `#[may_dangle]`, so by removing them we make `mpsc` types play nice with drop check. This was previously attempted in [rust-lang#105243](rust-lang#105243 (comment)) but then [abandoned due to a test failure](rust-lang#105243 (comment)). I've aligned the test with those for `Mutex` and `RwLock`.
Rollup merge of rust-lang#114965 - benschulz:mpsc-drop, r=dtolnay Remove Drop impl of mpsc Receiver and (Sync)Sender This change removes the empty `Drop` implementations for `mpsc::Receiver`, `mpsc::Sender` and `mpsc::SyncSender`. These implementations do not specify `#[may_dangle]`, so by removing them we make `mpsc` types play nice with drop check. This was previously attempted in [rust-lang#105243](rust-lang#105243 (comment)) but then [abandoned due to a test failure](rust-lang#105243 (comment)). I've aligned the test with those for `Mutex` and `RwLock`.
Also see the discussion at #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