about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/move_paths/builder.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-08-22 22:00:54 -0400
committerGitHub <noreply@github.com>2025-08-22 22:00:54 -0400
commitc80e77fa21fb9afa377783c85afbb49a50f3fc1a (patch)
tree8aaef1cbef21bd08c405bddb20ec8c18996b07cb /compiler/rustc_mir_dataflow/src/move_paths/builder.rs
parent77f980f20278d44fa5d08070db3e4bc79131fb25 (diff)
parente5bd01b533cfc85eb8a86d5f47d99e1c62d0e44d (diff)
downloadrust-c80e77fa21fb9afa377783c85afbb49a50f3fc1a.tar.gz
rust-c80e77fa21fb9afa377783c85afbb49a50f3fc1a.zip
Rollup merge of #145695 - cjgillot:place-elem-map, r=oli-obk,lcnr
Introduce ProjectionElem::try_map.

Small utility function useful to manipulate MIR place projections.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/move_paths/builder.rs')
-rw-r--r--compiler/rustc_mir_dataflow/src/move_paths/builder.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs
index 8bbc89fdcec..48718cad597 100644
--- a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs
+++ b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs
@@ -7,7 +7,6 @@ use rustc_middle::{bug, span_bug};
 use smallvec::{SmallVec, smallvec};
 use tracing::debug;
 
-use super::abs_domain::Lift;
 use super::{
     Init, InitIndex, InitKind, InitLocation, LocationMap, LookupResult, MoveData, MoveOut,
     MoveOutIndex, MovePath, MovePathIndex, MovePathLookup,
@@ -241,7 +240,7 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
             if union_path.is_none() {
                 // inlined from add_move_path because of a borrowck conflict with the iterator
                 base =
-                    *data.rev_lookup.projections.entry((base, elem.lift())).or_insert_with(|| {
+                    *data.rev_lookup.projections.entry((base, elem.kind())).or_insert_with(|| {
                         new_move_path(
                             &mut data.move_paths,
                             &mut data.path_map,
@@ -272,7 +271,7 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
             tcx,
             ..
         } = self;
-        *rev_lookup.projections.entry((base, elem.lift())).or_insert_with(move || {
+        *rev_lookup.projections.entry((base, elem.kind())).or_insert_with(move || {
             new_move_path(move_paths, path_map, init_path_map, Some(base), mk_place(*tcx))
         })
     }