@@ -371,9 +371,7 @@ impl<'a> CheckLoanCtxt<'a> {
371371 debug ! ( "mark_writes_through_upvars_as_used_mut(cmt={})" ,
372372 cmt. repr( this. tcx( ) ) ) ;
373373 match cmt. cat {
374- mc:: cat_local( id) |
375- mc:: cat_arg( id) |
376- mc:: cat_self( id) => {
374+ mc:: cat_local( id) | mc:: cat_arg( id) => {
377375 let mut used_mut_nodes = this. tcx ( )
378376 . used_mut_nodes
379377 . borrow_mut ( ) ;
@@ -459,7 +457,6 @@ impl<'a> CheckLoanCtxt<'a> {
459457 mc:: cat_rvalue( ..) |
460458 mc:: cat_local( ..) |
461459 mc:: cat_arg( _) |
462- mc:: cat_self( ..) |
463460 mc:: cat_deref( _, _, mc:: unsafe_ptr( ..) ) |
464461 mc:: cat_static_item( ..) |
465462 mc:: cat_deref( _, _, mc:: gc_ptr) |
@@ -790,7 +787,6 @@ fn check_loans_in_expr<'a>(this: &mut CheckLoanCtxt<'a>,
790787
791788 let method_map = this. bccx . method_map . borrow ( ) ;
792789 match expr. node {
793- ast:: ExprSelf |
794790 ast:: ExprPath ( ..) => {
795791 if !this. move_data . is_assignee ( expr. id ) {
796792 let cmt = this. bccx . cat_expr_unadjusted ( expr) ;
@@ -808,32 +804,24 @@ fn check_loans_in_expr<'a>(this: &mut CheckLoanCtxt<'a>,
808804 ast:: ExprCall ( f, ref args, _) => {
809805 this. check_call ( expr, Some ( f) , f. id , f. span , * args) ;
810806 }
811- ast:: ExprMethodCall ( callee_id, _, _, _ , ref args, _) => {
807+ ast:: ExprMethodCall ( callee_id, _, _, ref args, _) => {
812808 this. check_call ( expr, None , callee_id, expr. span , * args) ;
813809 }
814810 ast:: ExprIndex ( callee_id, _, rval) |
815811 ast:: ExprBinary ( callee_id, _, _, rval)
816812 if method_map. get ( ) . contains_key ( & expr. id ) => {
817- this. check_call ( expr,
818- None ,
819- callee_id,
820- expr. span ,
821- [ rval] ) ;
813+ this. check_call ( expr, None , callee_id, expr. span , [ rval] ) ;
822814 }
823815 ast:: ExprUnary ( callee_id, _, _) | ast:: ExprIndex ( callee_id, _, _)
824816 if method_map. get ( ) . contains_key ( & expr. id ) => {
825- this. check_call ( expr,
826- None ,
827- callee_id,
828- expr. span ,
829- [ ] ) ;
817+ this. check_call ( expr, None , callee_id, expr. span , [ ] ) ;
830818 }
831819 ast:: ExprInlineAsm ( ref ia) => {
832820 for & ( _, out) in ia. outputs . iter ( ) {
833821 this. check_assignment ( out) ;
834822 }
835823 }
836- _ => { }
824+ _ => { }
837825 }
838826}
839827
0 commit comments