-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Add Drop::pin_drop for pinned drops
#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
base: main
Are you sure you want to change the base?
Conversation
362f769 to
1497185
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
1497185 to
9b7201c
Compare
Drop::pin_drop for !Unpin typesDrop::pin_drop for pinned drops
This comment has been minimized.
This comment has been minimized.
d6ddfcf to
7b4bb5c
Compare
This comment has been minimized.
This comment has been minimized.
7b4bb5c to
36ca628
Compare
This comment has been minimized.
This comment has been minimized.
36ca628 to
252d6fc
Compare
This comment has been minimized.
This comment has been minimized.
|
The CI failed because |
252d6fc to
02b0b0d
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
02b0b0d to
7660d88
Compare
This comment has been minimized.
This comment has been minimized.
7660d88 to
33e3124
Compare
This comment has been minimized.
This comment has been minimized.
9618d10 to
c3e34d5
Compare
68643ec to
a3e6644
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Add `Drop::pin_drop` for pinned drops
|
@bors try cancel |
|
Try build cancelled. Cancelled workflows: |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Add `Drop::pin_drop` for pinned drops
|
FWIW, once you queue a PR once for rust-timer, it will stay queued until the first successful try build. |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (5839d92): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.1%, secondary 3.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.0%, secondary 3.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 475.389s -> 476.74s (0.28%) |
|
Now the only remaining question is where is the |
|
It should probably point to something from the main branch of the book repo to be safe. |
This PR is part of the
pin_ergonomicsexperiment (the tracking issue is #130494). It allows implementingDropwith a pinnedselfreceiver, which is required for safe pin-projection.Implementations:
dropandpin_dropshould be implemented.droporpin_drop. They should only be called by the drop glue.pin_dropmust and must only be used with types that support pin-projection (i.e. types with#[pin_v2]).fn drop(&pin mut self)and desugars tofn pin_drop(&pin mut self). (Will be in the next PRs)