@@ -321,7 +321,7 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
321
321
region:: Scope {
322
322
id : body. value . hir_id . local_id ,
323
323
data : region:: ScopeData :: Node
324
- } ) ) ;
324
+ } ) ) ;
325
325
let arg_cmt = Rc :: new ( self . mc . cat_rvalue (
326
326
arg. hir_id ,
327
327
arg. pat . span ,
@@ -402,20 +402,20 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
402
402
self . walk_expr ( & subexpr)
403
403
}
404
404
405
- hir:: ExprKind :: Unary ( hir:: UnDeref , ref base) => { // *base
405
+ hir:: ExprKind :: Unary ( hir:: UnDeref , ref base) => { // *base
406
406
self . select_from_expr ( & base) ;
407
407
}
408
408
409
- hir:: ExprKind :: Field ( ref base, _) => { // base.f
409
+ hir:: ExprKind :: Field ( ref base, _) => { // base.f
410
410
self . select_from_expr ( & base) ;
411
411
}
412
412
413
- hir:: ExprKind :: Index ( ref lhs, ref rhs) => { // lhs[rhs]
413
+ hir:: ExprKind :: Index ( ref lhs, ref rhs) => { // lhs[rhs]
414
414
self . select_from_expr ( & lhs) ;
415
415
self . consume_expr ( & rhs) ;
416
416
}
417
417
418
- hir:: ExprKind :: Call ( ref callee, ref args) => { // callee(args)
418
+ hir:: ExprKind :: Call ( ref callee, ref args) => { // callee(args)
419
419
self . walk_callee ( expr, & callee) ;
420
420
self . consume_exprs ( args) ;
421
421
}
@@ -801,10 +801,8 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
801
801
self . walk_pat ( discr_cmt. clone ( ) , & pat, mode) ;
802
802
}
803
803
804
- if let Some ( ref guard) = arm. guard {
805
- match guard {
806
- hir:: Guard :: If ( ref e) => self . consume_expr ( e) ,
807
- }
804
+ if let Some ( hir:: Guard :: If ( ref e) ) = arm. guard {
805
+ self . consume_expr ( e)
808
806
}
809
807
810
808
self . consume_expr ( & arm. body ) ;
@@ -826,12 +824,13 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
826
824
cmt_discr : mc:: cmt < ' tcx > ,
827
825
pat : & hir:: Pat ,
828
826
mode : & mut TrackMatchMode ) {
829
- debug ! ( "determine_pat_move_mode cmt_discr={:?} pat={:?}" , cmt_discr,
830
- pat ) ;
827
+ debug ! ( "determine_pat_move_mode cmt_discr={:?} pat={:?}" , cmt_discr, pat ) ;
828
+
831
829
return_if_err ! ( self . mc. cat_pattern( cmt_discr, pat, |cmt_pat, pat| {
832
830
if let PatKind :: Binding ( ..) = pat. node {
833
- let bm = * self . mc. tables. pat_binding_modes( ) . get( pat. hir_id)
834
- . expect( "missing binding mode" ) ;
831
+ let bm = * self . mc. tables. pat_binding_modes( )
832
+ . get( pat. hir_id)
833
+ . expect( "missing binding mode" ) ;
835
834
match bm {
836
835
ty:: BindByReference ( ..) =>
837
836
mode. lub( BorrowingMatch ) ,
0 commit comments