@@ -319,11 +319,11 @@ fn find_stmt_assigns_to<'tcx>(
319319
320320 match ( by_ref, & * rvalue) {
321321 ( true , mir:: Rvalue :: Ref ( _, _, place) ) | ( false , mir:: Rvalue :: Use ( mir:: Operand :: Copy ( place) ) ) => {
322- base_local_and_movability ( cx, mir, * place)
322+ Some ( base_local_and_movability ( cx, mir, * place) )
323323 } ,
324324 ( false , mir:: Rvalue :: Ref ( _, _, place) ) => {
325325 if let [ mir:: ProjectionElem :: Deref ] = place. as_ref ( ) . projection {
326- base_local_and_movability ( cx, mir, * place)
326+ Some ( base_local_and_movability ( cx, mir, * place) )
327327 } else {
328328 None
329329 }
@@ -340,7 +340,7 @@ fn base_local_and_movability<'tcx>(
340340 cx : & LateContext < ' tcx > ,
341341 mir : & mir:: Body < ' tcx > ,
342342 place : mir:: Place < ' tcx > ,
343- ) -> Option < ( mir:: Local , CannotMoveOut ) > {
343+ ) -> ( mir:: Local , CannotMoveOut ) {
344344 use rustc_middle:: mir:: PlaceRef ;
345345
346346 // Dereference. You cannot move things out from a borrowed value.
@@ -361,7 +361,7 @@ fn base_local_and_movability<'tcx>(
361361 && !is_copy ( cx, mir:: Place :: ty_from ( local, projection, & mir. local_decls , cx. tcx ) . ty ) ;
362362 }
363363
364- Some ( ( local, deref || field || slice) )
364+ ( local, deref || field || slice)
365365}
366366
367367struct LocalUseVisitor {
0 commit comments