Add Drop::pin_drop for pinned drops#144537
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
This comment has been minimized.
This comment has been minimized.
|
💔 Test for edafd5c failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
|
Broken links in the reference again. |
This comment was marked as resolved.
This comment was marked as resolved.
|
I think for fixing the test failure, I think I would prefer to do something like this: diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh
index 17eb2cea59a..d2989b3aae6 100755
--- a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh
+++ b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh
@@ -4,7 +4,9 @@ set -ex
##### Test stage 1 #####
-../x.py --stage 1 test --skip src/tools/tidy
+# linkchecker is skipped because mixing old rustc/rustdoc with new standard
+# library causes problems with generating correct links.
+../x.py --stage 1 test --skip src/tools/tidy --skip src/tools/linkchecker
# Run the `mir-opt` tests again but this time for a 32-bit target.
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` haveGenerally I think it is too problematic to try to get the linkchecks working with cc @jieyouxu @Kobzol in case you want to weigh in on this kind of change. This was previously discussed at https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Skipping.20stage.201.20tests/with/583642338 for a closely related issue. In this case, I don't think we can employ easy tricks to make this work in the general case. |
I would tend to agree. Should we extract the linkchecker change to a separate PR (I can review that bit)? (Though I'm fine with leaving the change in this PR too.) |
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
|
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. |
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for f56dcfe failed: CI. Failed job:
|
|
I investigated the The failed job crashed while running the stage2 rust-analyser I tried to reproduce this on a temporary branch from the exact failing auto head SHA, focused reproduction run: The No SIGSEGV reproduced, and I did not make any Rust code changes. Given that, I don’t think there is enough evidence for a code fix here yet. Could we retry the failed auto/CI job? |
|
@bors retry |
This comment has been minimized.
This comment has been minimized.
|
|
||
| impl Drop for StructWithDrop { | ||
| //~ MONO_ITEM fn <StructWithDrop as std::ops::Drop>::drop | ||
| //~ MONO_ITEM fn <StructWithDrop as std::ops::Drop>::pin_drop |
There was a problem hiding this comment.
It is not possible to manually call drop, so maybe it would be possible to only codegen drop or pin_drop depending on which was implemented and then have the drop glue directly call the correct method?
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 99eed20 (parent) -> e8f92f5 (this PR) Test differencesShow 30 test diffsStage 0
Stage 1
Stage 2
Additionally, 16 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard e8f92f576974f7d1d5ef5dfafc56eae303b4c73e --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (e8f92f5): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 1.5%, secondary 0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.1%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 499.454s -> 501.011s (0.31%) |
View all comments
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)