mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
type alias covers whole return
This commit is contained in:
parent
bd52f58e3b
commit
bd24b4006c
@ -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();
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user