mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
d5a74249c8
Rewrite `UnDerefer` Currently, `UnDerefer` is used by drop elaboration to undo the effects of the `Derefer` pass. However, it just recreates the original places with derefs in the middle of the projection. Because `ProjectionElem::Deref` is intended to be removed completely in the future, this will not work forever. This PR introduces a `deref_chain` method that returns the places behind `DerefTemp` locals in a place and rewrites the move path code to use this. In the process, `UnDerefer` was merged into `MovePathLookup`. Now that move paths use the same places as in the MIR, the other uses of `UnDerefer` no longer require it. See #98145 cc `@ouz-a` r? `@oli-obk` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |