@@ -318,11 +318,11 @@ fn find_stmt_assigns_to<'tcx>(
318318
319319 match ( by_ref, & * rvalue) {
320320 ( true , mir:: Rvalue :: Ref ( _, _, place) ) | ( false , mir:: Rvalue :: Use ( mir:: Operand :: Copy ( place) ) ) => {
321- base_local_and_movability ( cx, mir, * place)
321+ Some ( base_local_and_movability ( cx, mir, * place) )
322322 } ,
323323 ( false , mir:: Rvalue :: Ref ( _, _, place) ) => {
324324 if let [ mir:: ProjectionElem :: Deref ] = place. as_ref ( ) . projection {
325- base_local_and_movability ( cx, mir, * place)
325+ Some ( base_local_and_movability ( cx, mir, * place) )
326326 } else {
327327 None
328328 }
@@ -339,7 +339,7 @@ fn base_local_and_movability<'tcx>(
339339 cx : & LateContext < ' tcx > ,
340340 mir : & mir:: Body < ' tcx > ,
341341 place : mir:: Place < ' tcx > ,
342- ) -> Option < ( mir:: Local , CannotMoveOut ) > {
342+ ) -> ( mir:: Local , CannotMoveOut ) {
343343 use rustc_middle:: mir:: PlaceRef ;
344344
345345 // Dereference. You cannot move things out from a borrowed value.
@@ -360,7 +360,7 @@ fn base_local_and_movability<'tcx>(
360360 && !is_copy ( cx, mir:: Place :: ty_from ( local, projection, & mir. local_decls , cx. tcx ) . ty ) ;
361361 }
362362
363- Some ( ( local, deref || field || slice) )
363+ ( local, deref || field || slice)
364364}
365365
366366struct LocalUseVisitor {
0 commit comments