Skip to content

Turn projections into copies in CopyProp.#107662

Merged
bors merged 2 commits into
rust-lang:masterfrom
cjgillot:copy-projection
Feb 7, 2023
Merged

Turn projections into copies in CopyProp.#107662
bors merged 2 commits into
rust-lang:masterfrom
cjgillot:copy-projection

Conversation

@cjgillot

@cjgillot cjgillot commented Feb 4, 2023

Copy link
Copy Markdown
Contributor

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

rustbot commented Feb 4, 2023

Copy link
Copy Markdown
Collaborator

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

rustbot commented Feb 4, 2023

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@bors

bors commented Feb 4, 2023

Copy link
Copy Markdown
Collaborator

☔ 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
Copy Markdown
Contributor

not my place of expertise, r? compiler

@michaelwoerister

Copy link
Copy Markdown
Member

r? mir-opt

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

oli-obk commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

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

Comment thread compiler/rustc_mir_transform/src/copy_prop.rs
@oli-obk

oli-obk commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Feb 6, 2023

Copy link
Copy Markdown
Collaborator

📌 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