@@ -319,11 +319,11 @@ fn find_stmt_assigns_to<'tcx>(
319
319
320
320
match ( by_ref, & * rvalue) {
321
321
( 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) )
323
323
} ,
324
324
( false , mir:: Rvalue :: Ref ( _, _, place) ) => {
325
325
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) )
327
327
} else {
328
328
None
329
329
}
@@ -340,7 +340,7 @@ fn base_local_and_movability<'tcx>(
340
340
cx : & LateContext < ' tcx > ,
341
341
mir : & mir:: Body < ' tcx > ,
342
342
place : mir:: Place < ' tcx > ,
343
- ) -> Option < ( mir:: Local , CannotMoveOut ) > {
343
+ ) -> ( mir:: Local , CannotMoveOut ) {
344
344
use rustc_middle:: mir:: PlaceRef ;
345
345
346
346
// Dereference. You cannot move things out from a borrowed value.
@@ -361,7 +361,7 @@ fn base_local_and_movability<'tcx>(
361
361
&& !is_copy ( cx, mir:: Place :: ty_from ( local, projection, & mir. local_decls , cx. tcx ) . ty ) ;
362
362
}
363
363
364
- Some ( ( local, deref || field || slice) )
364
+ ( local, deref || field || slice)
365
365
}
366
366
367
367
struct LocalUseVisitor {
0 commit comments