-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Refactor move analysis subpath representation #147575
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
base: master
Are you sure you want to change the base?
Conversation
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. |
rustbot has assigned @jdonszelmann. Use |
This comment has been minimized.
This comment has been minimized.
/// Otherwise `array[from..to]`. | ||
/// | ||
/// This projection cannot have `ConstantIndex` or additional `Subslice` projections after it | ||
/// before runtime MIR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that the MIR validation pass could check?
☔ The latest upstream changes (presumably #147574) made this pull request unmergeable. Please resolve the merge conflicts. |
Haven't reviewed the validation yet, but the main part lgtm and is an improvement in readability and maintainability |
Follow up to #147055
This PR does two things:
Subslice
projectionsProjectionElem
, using a new enumMoveSubPath
insteadProjectionElem::Deref
is removedI 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.