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

Turn projections into copies in CopyProp. #107662

Merged
merged 2 commits into from
Feb 7, 2023

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Feb 4, 2023

The current implementation can leave behind projections that are moved out several times.

This PR widens the check to turn such moves into copies: a move out of a projection of a copy is equivalent to a copy of the original projection.

@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 4, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@bors
Copy link
Contributor

bors commented Feb 4, 2023

☔ The latest upstream changes (presumably #107267) made this pull request unmergeable. Please resolve the merge conflicts.

@cjgillot cjgillot added the A-mir-opt Area: MIR optimizations label Feb 5, 2023
@compiler-errors
Copy link
Member

not my place of expertise, r? compiler

@michaelwoerister
Copy link
Member

r? mir-opt

@rustbot rustbot assigned oli-obk and unassigned michaelwoerister Feb 6, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Feb 6, 2023

a move out of a projection of a copy is equivalent to a copy of the original projection.

Please leave that as a comment on the !deref check

r=me

@oli-obk
Copy link
Contributor

oli-obk commented Feb 6, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 6, 2023

📌 Commit 9c5add1 has been approved by oli-obk

It is now in the queue for this repository.

@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 Feb 6, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 6, 2023
Turn projections into copies in CopyProp.

The current implementation can leave behind projections that are moved out several times.

This PR widens the check to turn such moves into copies: a move out of a projection of a copy is equivalent to a copy of the original projection.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 7, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#100599 (Add compiler error E0523 long description and test)
 - rust-lang#107471 (rustdoc: do not include empty default-settings tag in HTML)
 - rust-lang#107555 (Modify existing bounds if they exist)
 - rust-lang#107662 (Turn projections into copies in CopyProp.)
 - rust-lang#107695 (Add test for Future inflating arg size to 3x )
 - rust-lang#107700 (Run the tools builder on all PRs)
 - rust-lang#107706 (Mark 'atomic_mut_ptr' methods const)
 - rust-lang#107709 (Fix problem noticed in PR106859 with char -> u8 suggestion)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 306dbaf into rust-lang:master Feb 7, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 7, 2023
@cjgillot cjgillot deleted the copy-projection branch February 7, 2023 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants