about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/move_paths/mod.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-09-30 20:55:15 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-10-21 10:31:39 +0000
commit252c64722f034f14db69d68acd88b0976bd6676d (patch)
tree520be57e045998824c6cccfeeb25fbe72394b974 /compiler/rustc_mir_dataflow/src/move_paths/mod.rs
parent4bedd7de6e96a008121c54f34baece868b70b083 (diff)
downloadrust-252c64722f034f14db69d68acd88b0976bd6676d.tar.gz
rust-252c64722f034f14db69d68acd88b0976bd6676d.zip
Parametrize gather_moves by filter.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/move_paths/mod.rs')
-rw-r--r--compiler/rustc_mir_dataflow/src/move_paths/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs
index 1ab850a5eb8..7ab1a9ed069 100644
--- a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs
+++ b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs
@@ -2,7 +2,7 @@ use crate::un_derefer::UnDerefer;
 use rustc_data_structures::fx::FxHashMap;
 use rustc_index::{IndexSlice, IndexVec};
 use rustc_middle::mir::*;
-use rustc_middle::ty::{ParamEnv, TyCtxt};
+use rustc_middle::ty::{ParamEnv, Ty, TyCtxt};
 use rustc_span::Span;
 use smallvec::SmallVec;
 
@@ -351,8 +351,9 @@ impl<'tcx> MoveData<'tcx> {
         body: &Body<'tcx>,
         tcx: TyCtxt<'tcx>,
         param_env: ParamEnv<'tcx>,
+        filter: impl Fn(Ty<'tcx>) -> bool,
     ) -> MoveData<'tcx> {
-        builder::gather_moves(body, tcx, param_env)
+        builder::gather_moves(body, tcx, param_env, filter)
     }
 
     /// For the move path `mpi`, returns the root local variable (if any) that starts the path.