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