Skip to content

Implement Drop::pin_drop for !Unpin types #144537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

frank-king
Copy link
Contributor

No description provided.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 27, 2025
@rust-log-analyzer
Copy link
Collaborator

The job pr-check-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] gimli test:false 5.698
    Checking addr2line v0.25.0
[RUSTC-TIMING] addr2line test:false 0.556
[RUSTC-TIMING] object test:false 9.544
error: could not impl `Drop::drop(&mut self)` for a type that implements `!Unpin`
   --> library/std/src/sys/pal/unix/sync/condvar.rs:163:5
    |
163 |     fn drop(&mut self) {
    |     ^^^^^^^^^^^^^^^^^^ help: consider implement `Drop::pin_drop(&pin mut self)` instead
    |
    = help: `impl !Unpin` is intended for pinned projections, which requires the value pinned until it's deallocated
note: `Unpin` implemented for `sys::pal::unix::sync::condvar::Condvar`
   --> library/std/src/sys/pal/unix/sync/condvar.rs:156:1
    |
156 | impl !Unpin for Condvar {}
    | ^^^^^^^^^^^^^^^^^^^^^^^

error: could not impl `Drop::drop(&mut self)` for a type that implements `!Unpin`
   --> library/std/src/sys/pal/unix/sync/mutex.rs:107:5
    |
107 |     fn drop(&mut self) {
    |     ^^^^^^^^^^^^^^^^^^ help: consider implement `Drop::pin_drop(&pin mut self)` instead
    |
    = help: `impl !Unpin` is intended for pinned projections, which requires the value pinned until it's deallocated
note: `Unpin` implemented for `sys::pal::unix::sync::mutex::Mutex`
   --> library/std/src/sys/pal/unix/sync/mutex.rs:101:1
    |
101 | impl !Unpin for Mutex {}
    | ^^^^^^^^^^^^^^^^^^^^^

[RUSTC-TIMING] std test:false 6.860
error: could not compile `std` (lib) due to 2 previous errors
Build completed unsuccessfully in 0:03:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants