Skip to content

Conversation

beepster4096
Copy link
Contributor

@beepster4096 beepster4096 commented Oct 10, 2025

Follow up to #147055

This PR does two things:

  1. Document/validate move analysis's assumptions about Subslice projections
  2. Decouple move paths from ProjectionElem, using a new enum MoveSubPath instead
    • This would be needed eventually when ProjectionElem::Deref is removed

I wanted to do even more abstraction, making MovePathLookup::find return an iterator to remove the special handling of subslices in borrowck, but that regressed diagnostics and just wasn't worth the complexity.

@rustbot
Copy link
Collaborator

rustbot commented Oct 10, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @vakaras

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol, @tshepang

@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide 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 Oct 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 10, 2025

r? @jdonszelmann

rustbot has assigned @jdonszelmann.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Oct 11, 2025

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

@oli-obk
Copy link
Contributor

oli-obk commented Oct 11, 2025

Haven't reviewed the validation yet, but the main part lgtm and is an improvement in readability and maintainability

@rustbot

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 12, 2025

r=me after another rebase

@rustbot
Copy link
Collaborator

rustbot commented Oct 12, 2025

This PR was rebased onto a different master 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.

@jdonszelmann
Copy link
Contributor

r? ralfjung

@rustbot rustbot assigned RalfJung and unassigned jdonszelmann Oct 12, 2025
@RalfJung
Copy link
Member

@jdonszelmann Uh, why me? I don't know any of this code... I just commented on like a 3-line change in syntax.rs.^^

r? @oli-obk

@rustbot rustbot assigned oli-obk and unassigned RalfJung Oct 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 12, 2025

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 19, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 19, 2025

📌 Commit bce7f71 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 19, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 19, 2025
bors added a commit that referenced this pull request Oct 19, 2025
Rollup of 4 pull requests

Successful merges:

 - #147575 (Refactor move analysis subpath representation)
 - #147864 (Parse `const unsafe trait` properly)
 - #147868 (MirPatch: Simplify new_local.)
 - #147873 (comments for deduce_param_attrs)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Oct 19, 2025
Refactor move analysis subpath representation

Follow up to #147055

This PR does two things:
1. Document/validate move analysis's assumptions about `Subslice` projections
2. Decouple move paths from `ProjectionElem`, using a new enum `MoveSubPath` instead
    - This would be needed eventually when `ProjectionElem::Deref` is removed

I wanted to do even more abstraction, making `MovePathLookup::find` return an iterator to remove the special handling of subslices in borrowck, but that regressed diagnostics and just wasn't worth the complexity.
@bors
Copy link
Collaborator

bors commented Oct 19, 2025

⌛ Testing commit bce7f71 with merge ec3d18a...

@matthiaskrgr
Copy link
Member

@bors retry yield #147884

bors added a commit that referenced this pull request Oct 19, 2025
Rollup of 4 pull requests

Successful merges:

 - #147575 (Refactor move analysis subpath representation)
 - #147864 (Parse `const unsafe trait` properly)
 - #147868 (MirPatch: Simplify new_local.)
 - #147873 (comments for deduce_param_attrs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3bfd712 into rust-lang:master Oct 19, 2025
10 of 11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 19, 2025
rust-timer added a commit that referenced this pull request Oct 19, 2025
Rollup merge of #147575 - beepster4096:movesubpath, r=oli-obk

Refactor move analysis subpath representation

Follow up to #147055

This PR does two things:
1. Document/validate move analysis's assumptions about `Subslice` projections
2. Decouple move paths from `ProjectionElem`, using a new enum `MoveSubPath` instead
    - This would be needed eventually when `ProjectionElem::Deref` is removed

I wanted to do even more abstraction, making `MovePathLookup::find` return an iterator to remove the special handling of subslices in borrowck, but that regressed diagnostics and just wasn't worth the complexity.
@bors
Copy link
Collaborator

bors commented Oct 19, 2025

⌛ Testing commit bce7f71 with merge 4ddbb60...

github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Oct 20, 2025
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#147575 (Refactor move analysis subpath representation)
 - rust-lang/rust#147864 (Parse `const unsafe trait` properly)
 - rust-lang/rust#147868 (MirPatch: Simplify new_local.)
 - rust-lang/rust#147873 (comments for deduce_param_attrs)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustc-dev-guide Area: rustc-dev-guide 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.

8 participants