Skip to content

Commit bd24b40

Browse files
committed
type alias covers whole return
1 parent bd52f58 commit bd24b40

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

compiler/rustc_mir_dataflow/src/move_paths/builder.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,13 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
207207
}
208208
}
209209

210-
pub type MoveDat<'tcx> = (FxHashMap<Local, Place<'tcx>>, MoveData<'tcx>);
210+
pub type MoveDat<'tcx> = Result<
211+
(FxHashMap<Local, Place<'tcx>>, MoveData<'tcx>),
212+
(MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>),
213+
>;
211214

212215
impl<'a, 'tcx> MoveDataBuilder<'a, 'tcx> {
213-
fn finalize(
214-
self,
215-
) -> Result<MoveDat<'tcx>, (MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>)> {
216+
fn finalize(self) -> MoveDat<'tcx> {
216217
debug!("{}", {
217218
debug!("moves for {:?}:", self.body.span);
218219
for (j, mo) in self.data.moves.iter_enumerated() {
@@ -237,7 +238,7 @@ pub(super) fn gather_moves<'tcx>(
237238
body: &Body<'tcx>,
238239
tcx: TyCtxt<'tcx>,
239240
param_env: ty::ParamEnv<'tcx>,
240-
) -> Result<MoveDat<'tcx>, (MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>)> {
241+
) -> MoveDat<'tcx> {
241242
let mut builder = MoveDataBuilder::new(body, tcx, param_env);
242243

243244
builder.gather_args();

compiler/rustc_mir_dataflow/src/move_paths/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ impl<'tcx> MoveData<'tcx> {
387387
body: &Body<'tcx>,
388388
tcx: TyCtxt<'tcx>,
389389
param_env: ParamEnv<'tcx>,
390-
) -> Result<MoveDat<'tcx>, (MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>)> {
390+
) -> MoveDat<'tcx> {
391391
builder::gather_moves(body, tcx, param_env)
392392
}
393393

0 commit comments

Comments
 (0)