diff options
| author | ouz-a <oguz.agcayazi@gmail.com> | 2022-07-28 13:52:49 +0300 |
|---|---|---|
| committer | ouz-a <oguz.agcayazi@gmail.com> | 2022-07-28 13:52:49 +0300 |
| commit | bd24b4006c98425aa994763acf7f7e18607c7df1 (patch) | |
| tree | d525054b96c6b49c8d4da7359144335770b30035 /compiler/rustc_mir_dataflow | |
| parent | bd52f58e3b4008c35f677eec5fe18676f686274b (diff) | |
| download | rust-bd24b4006c98425aa994763acf7f7e18607c7df1.tar.gz rust-bd24b4006c98425aa994763acf7f7e18607c7df1.zip | |
type alias covers whole return
Diffstat (limited to 'compiler/rustc_mir_dataflow')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/builder.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/mod.rs | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs index b8634fd568b..116e5c1f3ce 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs @@ -207,12 +207,13 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> { } } -pub type MoveDat<'tcx> = (FxHashMap<Local, Place<'tcx>>, MoveData<'tcx>); +pub type MoveDat<'tcx> = Result< + (FxHashMap<Local, Place<'tcx>>, MoveData<'tcx>), + (MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>), +>; impl<'a, 'tcx> MoveDataBuilder<'a, 'tcx> { - fn finalize( - self, - ) -> Result<MoveDat<'tcx>, (MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>)> { + fn finalize(self) -> MoveDat<'tcx> { debug!("{}", { debug!("moves for {:?}:", self.body.span); for (j, mo) in self.data.moves.iter_enumerated() { @@ -237,7 +238,7 @@ pub(super) fn gather_moves<'tcx>( body: &Body<'tcx>, tcx: TyCtxt<'tcx>, param_env: ty::ParamEnv<'tcx>, -) -> Result<MoveDat<'tcx>, (MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>)> { +) -> MoveDat<'tcx> { let mut builder = MoveDataBuilder::new(body, tcx, param_env); builder.gather_args(); diff --git a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs index aeb985143fd..a951c5b0b1c 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs @@ -387,7 +387,7 @@ impl<'tcx> MoveData<'tcx> { body: &Body<'tcx>, tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>, - ) -> Result<MoveDat<'tcx>, (MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>)> { + ) -> MoveDat<'tcx> { builder::gather_moves(body, tcx, param_env) } |
