@@ -371,9 +371,7 @@ impl<'a> CheckLoanCtxt<'a> {
371
371
debug ! ( "mark_writes_through_upvars_as_used_mut(cmt={})" ,
372
372
cmt. repr( this. tcx( ) ) ) ;
373
373
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) => {
377
375
let mut used_mut_nodes = this. tcx ( )
378
376
. used_mut_nodes
379
377
. borrow_mut ( ) ;
@@ -459,7 +457,6 @@ impl<'a> CheckLoanCtxt<'a> {
459
457
mc:: cat_rvalue( ..) |
460
458
mc:: cat_local( ..) |
461
459
mc:: cat_arg( _) |
462
- mc:: cat_self( ..) |
463
460
mc:: cat_deref( _, _, mc:: unsafe_ptr( ..) ) |
464
461
mc:: cat_static_item( ..) |
465
462
mc:: cat_deref( _, _, mc:: gc_ptr) |
@@ -790,7 +787,6 @@ fn check_loans_in_expr<'a>(this: &mut CheckLoanCtxt<'a>,
790
787
791
788
let method_map = this. bccx . method_map . borrow ( ) ;
792
789
match expr. node {
793
- ast:: ExprSelf |
794
790
ast:: ExprPath ( ..) => {
795
791
if !this. move_data . is_assignee ( expr. id ) {
796
792
let cmt = this. bccx . cat_expr_unadjusted ( expr) ;
@@ -808,32 +804,24 @@ fn check_loans_in_expr<'a>(this: &mut CheckLoanCtxt<'a>,
808
804
ast:: ExprCall ( f, ref args, _) => {
809
805
this. check_call ( expr, Some ( f) , f. id , f. span , * args) ;
810
806
}
811
- ast:: ExprMethodCall ( callee_id, _, _, _ , ref args, _) => {
807
+ ast:: ExprMethodCall ( callee_id, _, _, ref args, _) => {
812
808
this. check_call ( expr, None , callee_id, expr. span , * args) ;
813
809
}
814
810
ast:: ExprIndex ( callee_id, _, rval) |
815
811
ast:: ExprBinary ( callee_id, _, _, rval)
816
812
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] ) ;
822
814
}
823
815
ast:: ExprUnary ( callee_id, _, _) | ast:: ExprIndex ( callee_id, _, _)
824
816
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 , [ ] ) ;
830
818
}
831
819
ast:: ExprInlineAsm ( ref ia) => {
832
820
for & ( _, out) in ia. outputs . iter ( ) {
833
821
this. check_assignment ( out) ;
834
822
}
835
823
}
836
- _ => { }
824
+ _ => { }
837
825
}
838
826
}
839
827
0 commit comments