Skip to content

2229: Don't move out of drop type - #88477

Merged
bors merged 1 commit into
rust-lang:masterfrom
sexxi-goose:issue-88476
Sep 8, 2021
Merged

2229: Don't move out of drop type#88477
bors merged 1 commit into
rust-lang:masterfrom
sexxi-goose:issue-88476

Conversation

@arora-aman

@arora-amanarora-aman commented Aug 30, 2021

Copy link
Copy Markdown
Contributor

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 30, 2021
@arora-aman
arora-amanforce-pushed the issue-88476 branch 2 times, most recently from a677558 to 3d7c237CompareSeptember 3, 2021 08:24
@arora-amanarora-aman changed the title 2229: Handle drop_defined_for_type during migration2229: Don't move out of drop type 3d7c237Sep 3, 2021
@nikomatsakisnikomatsakis added the T-lang Relevant to the language team label Sep 3, 2021
@nikomatsakis

Copy link
Copy Markdown
Contributor

@rfcbot fcp merge

As discussed in our [last triage meeting], this is an interesting semantic question and a tweak to the closure rules. I've written up the my conclusion in this hackmd, which also includes a number of other details. I wanted to do an FCP to get ✅ from the @rust-lang/lang team that they've seen this change. There is some urgency here owing to the Rust 2021 edition timeline.

@rfcbot

rfcbot commented Sep 3, 2021

Copy link
Copy Markdown

Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbotrfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Sep 3, 2021
lint::builtin::RUST_2021_INCOMPATIBLE_CLOSURE_CAPTURES,
closure_hir_id,
closure_head_span,
closure_head_span,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit surprised that rustfmt isn't complaining about this extra space.

@arora-amanarora-amanSep 3, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised ./x.py fmt made this change 😂

@camelid

Copy link
Copy Markdown
Member

@arora-aman Not a big deal at all, but was it intentional that you renamed this PR from 2229: Handle drop_defined_for_type during migration to 2229: Don't move out of drop type 3d7c237?

@arora-amanarora-aman changed the title 2229: Don't move out of drop type 3d7c2372229: Don't move out of drop typeSep 5, 2021
@arora-aman

Copy link
Copy Markdown
ContributorAuthor

@arora-aman Not a big deal at all, but was it intentional that you renamed this PR from 2229: Handle drop_defined_for_type during migration to 2229: Don't move out of drop type 3d7c237?

wwops, the commit didn't need to be there. But yes we changed how we handle the issue -- so I updated the title

@camelid

Copy link
Copy Markdown
Member

(Also just noting that I think this will need to be backported to beta now that the branch has happened.)

@scottmcm

Copy link
Copy Markdown
Member

I was convinced in the triage meeting that there are already enough consequences of Drop and Copy that it's not weird for things to be trait-dependent here. And since it only comes up in move closures, being more aggressive about moving larger things there seems reasonable to me.

@rfcbot reviewed

@rfcbotrfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Sep 6, 2021
@rfcbot

Copy link
Copy Markdown

🔔 This is now entering its final comment period, as per the review above. 🔔

@Mark-SimulacrumMark-Simulacrum added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 6, 2021
@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+ p=1

Rust 2021 related

@bors

bors commented Sep 7, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 153aa71 has been approved by nikomatsakis

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2021
@bors

bors commented Sep 8, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 153aa71 with merge 0d0d2fe...

@borsbors mentioned this pull request Sep 8, 2021
@bors

bors commented Sep 8, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing 0d0d2fe to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Sep 8, 2021
@bors
bors merged commit 0d0d2fe into rust-lang:masterSep 8, 2021
@rustbotrustbot added this to the 1.57.0 milestone Sep 8, 2021
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0d0d2fe): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@nikomatsakis

Copy link
Copy Markdown
Contributor

I moved the document to this design doc on the rfc-2229 repo: https://github.com/rust-lang/project-rfc-2229/blob/master/design-doc-closure-capture-drop-copy-structs.md

@apiraino

Copy link
Copy Markdown
Contributor

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbotrustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 9, 2021
@Mark-SimulacrumMark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 9, 2021
@Mark-SimulacrumMark-Simulacrum modified the milestones: 1.57.0, 1.56.0Sep 9, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 11, 2021
…ulacrum
[beta] bootstrap bump and backports
This bumps the beta bootstrap compiler to the released 1.55.0, and backports the following PRs:
* Drop 1.56 stabilizations from 1.55 release notes rust-lang#88694
* 2229: Don't move out of drop type rust-lang#88477
* Work around CI issue with windows sdk 10.0.20348.0. rust-lang#88797
Cargo update:
1 commits in 18751dd3f238d94d384a7fe967abfac06cbfe0b9..d199d817e4bb70facc710716e73b5dddf80bc055
2021-09-01 14:26:00 +0000 to 2021-09-09 14:08:56 +0000
- [beta] Fix `cargo fix --edition` on stable. (rust-lang/cargo#9891)
r? `@Mark-Simulacrum`
@rfcbotrfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Sep 16, 2021
@apirainoapiraino removed the to-announce Announce this issue on triage meeting label Sep 16, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing rust_2021_incompatible_closure_captures with manual drop and move closure

12 participants

@arora-aman@nikomatsakis@rfcbot@camelid@scottmcm@bors@rust-timer@apiraino@nbdd0121@Mark-Simulacrum@rust-highfive@rustbot