@@ -207,13 +207,12 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
207207 }
208208}
209209
210+ pub type MoveDat < ' tcx > = ( FxHashMap < Local , Place < ' tcx > > , MoveData < ' tcx > ) ;
211+
210212impl < ' a , ' tcx > MoveDataBuilder < ' a , ' tcx > {
211213 fn finalize (
212214 self ,
213- ) -> Result <
214- ( FxHashMap < rustc_middle:: mir:: Local , rustc_middle:: mir:: Place < ' tcx > > , MoveData < ' tcx > ) ,
215- ( MoveData < ' tcx > , Vec < ( Place < ' tcx > , MoveError < ' tcx > ) > ) ,
216- > {
215+ ) -> Result < MoveDat < ' tcx > , ( MoveData < ' tcx > , Vec < ( Place < ' tcx > , MoveError < ' tcx > ) > ) > {
217216 debug ! ( "{}" , {
218217 debug!( "moves for {:?}:" , self . body. span) ;
219218 for ( j, mo) in self . data. moves. iter_enumerated( ) {
@@ -226,10 +225,10 @@ impl<'a, 'tcx> MoveDataBuilder<'a, 'tcx> {
226225 "done dumping moves"
227226 } ) ;
228227
229- if !self . errors . is_empty ( ) {
230- Err ( ( self . data , self . errors ) )
231- } else {
228+ if self . errors . is_empty ( ) {
232229 Ok ( ( self . un_derefer . derefer_sidetable , self . data ) )
230+ } else {
231+ Err ( ( self . data , self . errors ) )
233232 }
234233 }
235234}
@@ -238,10 +237,7 @@ pub(super) fn gather_moves<'tcx>(
238237 body : & Body < ' tcx > ,
239238 tcx : TyCtxt < ' tcx > ,
240239 param_env : ty:: ParamEnv < ' tcx > ,
241- ) -> Result <
242- ( FxHashMap < rustc_middle:: mir:: Local , rustc_middle:: mir:: Place < ' tcx > > , MoveData < ' tcx > ) ,
243- ( MoveData < ' tcx > , Vec < ( Place < ' tcx > , MoveError < ' tcx > ) > ) ,
244- > {
240+ ) -> Result < MoveDat < ' tcx > , ( MoveData < ' tcx > , Vec < ( Place < ' tcx > , MoveError < ' tcx > ) > ) > {
245241 let mut builder = MoveDataBuilder :: new ( body, tcx, param_env) ;
246242
247243 builder. gather_args ( ) ;
0 commit comments