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