Skip to content
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

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

Merged
merged 1 commit into from
Sep 8, 2021
Merged

Conversation

arora-aman
Copy link
Member

@arora-aman arora-aman commented Aug 30, 2021

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 30, 2021
@arora-aman arora-aman force-pushed the issue-88476 branch 2 times, most recently from a677558 to 3d7c237 Compare September 3, 2021 08:24
@arora-aman arora-aman changed the title 2229: Handle drop_defined_for_type during migration 2229: Don't move out of drop type 3d7c237 Sep 3, 2021
@nikomatsakis nikomatsakis added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Sep 3, 2021
@nikomatsakis
Copy link
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
Copy link

rfcbot commented Sep 3, 2021

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.

@rfcbot rfcbot 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
@@ -626,7 +633,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
self.tcx.struct_span_lint_hir(
lint::builtin::RUST_2021_INCOMPATIBLE_CLOSURE_CAPTURES,
closure_hir_id,
closure_head_span,
closure_head_span,
Copy link
Contributor

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.

Copy link
Member Author

@arora-aman arora-aman Sep 3, 2021

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
Member

camelid commented Sep 5, 2021

@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-aman arora-aman changed the title 2229: Don't move out of drop type 3d7c237 2229: Don't move out of drop type Sep 5, 2021
@arora-aman
Copy link
Member Author

@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
Member

camelid commented Sep 5, 2021

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

@scottmcm
Copy link
Member

scottmcm commented Sep 6, 2021

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

@rfcbot rfcbot 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

rfcbot commented Sep 6, 2021

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

@Mark-Simulacrum Mark-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
Contributor

@bors r+ p=1

Rust 2021 related

@bors
Copy link
Contributor

bors commented Sep 7, 2021

📌 Commit 153aa71 has been approved by nikomatsakis

@bors bors 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
Copy link
Contributor

bors commented Sep 8, 2021

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

@bors
Copy link
Contributor

bors commented Sep 8, 2021

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 8, 2021
@bors bors merged commit 0d0d2fe into rust-lang:master Sep 8, 2021
@rustbot rustbot added this to the 1.57.0 milestone Sep 8, 2021
@rust-timer
Copy link
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
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
Contributor

apiraino commented Sep 9, 2021

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 9, 2021
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 9, 2021
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.57.0, 1.56.0 Sep 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`
@rfcbot rfcbot 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
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
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