@@ -92,28 +92,28 @@ pub fn gather_loans(bccx: @BorrowckCtxt,
9292 visit_pat : add_pat_to_id_range,
9393 visit_local : gather_loans_in_local,
9494 .. * visit:: default_visitor ( ) } ) ;
95- ( v. visit_block ) ( body, glcx, v) ;
95+ ( v. visit_block ) ( body, ( glcx, v) ) ;
9696 return ( glcx. id_range , glcx. all_loans , glcx. move_data ) ;
9797}
9898
9999fn add_pat_to_id_range ( p : @ast:: pat ,
100- this : @mut GatherLoanCtxt ,
101- v : visit:: vt < @mut GatherLoanCtxt > ) {
100+ ( this, v ) : ( @mut GatherLoanCtxt ,
101+ visit:: vt < @mut GatherLoanCtxt > ) ) {
102102 // NB: This visitor function just adds the pat ids into the id
103103 // range. We gather loans that occur in patterns using the
104104 // `gather_pat()` method below. Eventually these two should be
105105 // brought together.
106106 this. id_range . add ( p. id ) ;
107- visit:: visit_pat ( p, this, v) ;
107+ visit:: visit_pat ( p, ( this, v) ) ;
108108}
109109
110110fn gather_loans_in_fn ( fk : & visit:: fn_kind ,
111111 decl : & ast:: fn_decl ,
112112 body : & ast:: blk ,
113113 sp : span ,
114114 id : ast:: node_id ,
115- this : @mut GatherLoanCtxt ,
116- v : visit:: vt < @mut GatherLoanCtxt > ) {
115+ ( this, v ) : ( @mut GatherLoanCtxt ,
116+ visit:: vt < @mut GatherLoanCtxt > ) ) {
117117 match fk {
118118 // Do not visit items here, the outer loop in borrowck/mod
119119 // will visit them for us in turn.
@@ -124,22 +124,22 @@ fn gather_loans_in_fn(fk: &visit::fn_kind,
124124 // Visit closures as part of the containing item.
125125 & visit:: fk_anon( * ) | & visit:: fk_fn_block( * ) => {
126126 this. push_repeating_id ( body. node . id ) ;
127- visit:: visit_fn ( fk, decl, body, sp, id, this, v) ;
127+ visit:: visit_fn ( fk, decl, body, sp, id, ( this, v) ) ;
128128 this. pop_repeating_id ( body. node . id ) ;
129129 }
130130 }
131131}
132132
133133fn gather_loans_in_block ( blk : & ast:: blk ,
134- this : @mut GatherLoanCtxt ,
135- vt : visit:: vt < @mut GatherLoanCtxt > ) {
134+ ( this, vt ) : ( @mut GatherLoanCtxt ,
135+ visit:: vt < @mut GatherLoanCtxt > ) ) {
136136 this. id_range . add ( blk. node . id ) ;
137- visit:: visit_block ( blk, this, vt) ;
137+ visit:: visit_block ( blk, ( this, vt) ) ;
138138}
139139
140140fn gather_loans_in_local ( local : @ast:: local ,
141- this : @mut GatherLoanCtxt ,
142- vt : visit:: vt < @mut GatherLoanCtxt > ) {
141+ ( this, vt ) : ( @mut GatherLoanCtxt ,
142+ visit:: vt < @mut GatherLoanCtxt > ) ) {
143143 if local. node . init . is_none ( ) {
144144 // Variable declarations without initializers are considered "moves":
145145 let tcx = this. bccx . tcx ;
@@ -163,12 +163,12 @@ fn gather_loans_in_local(local: @ast::local,
163163 }
164164 }
165165
166- visit:: visit_local ( local, this, vt) ;
166+ visit:: visit_local ( local, ( this, vt) ) ;
167167}
168168
169169fn gather_loans_in_expr( ex : @ast:: expr ,
170- this : @mut GatherLoanCtxt ,
171- vt : visit:: vt < @mut GatherLoanCtxt > ) {
170+ ( this, vt ) : ( @mut GatherLoanCtxt ,
171+ visit:: vt < @mut GatherLoanCtxt > ) ) {
172172 let bccx = this. bccx ;
173173 let tcx = bccx. tcx ;
174174
@@ -208,7 +208,7 @@ fn gather_loans_in_expr(ex: @ast::expr,
208208 // for the lifetime `scope_r` of the resulting ptr:
209209 let scope_r = ty_region ( tcx, ex. span , ty:: expr_ty ( tcx, ex) ) ;
210210 this. guarantee_valid ( ex. id , ex. span , base_cmt, mutbl, scope_r) ;
211- visit:: visit_expr ( ex, this, vt) ;
211+ visit:: visit_expr ( ex, ( this, vt) ) ;
212212 }
213213
214214 ast:: expr_assign( l, _) | ast:: expr_assign_op( _, _, l, _) => {
@@ -225,7 +225,7 @@ fn gather_loans_in_expr(ex: @ast::expr,
225225 // with moves etc, just ignore.
226226 }
227227 }
228- visit:: visit_expr ( ex, this, vt) ;
228+ visit:: visit_expr ( ex, ( this, vt) ) ;
229229 }
230230
231231 ast:: expr_match( ex_v, ref arms) => {
@@ -235,7 +235,7 @@ fn gather_loans_in_expr(ex: @ast::expr,
235235 this. gather_pat ( cmt, * pat, arm. body . node . id , ex. id ) ;
236236 }
237237 }
238- visit:: visit_expr( ex, this, vt) ;
238+ visit:: visit_expr( ex, ( this, vt) ) ;
239239 }
240240
241241 ast:: expr_index( _, _, arg) |
@@ -249,36 +249,36 @@ fn gather_loans_in_expr(ex: @ast::expr,
249249 let scope_r = ty:: re_scope ( ex. id ) ;
250250 let arg_cmt = this. bccx . cat_expr ( arg) ;
251251 this. guarantee_valid ( arg. id , arg. span , arg_cmt, m_imm, scope_r) ;
252- visit:: visit_expr ( ex, this, vt) ;
252+ visit:: visit_expr ( ex, ( this, vt) ) ;
253253 }
254254
255255 // see explanation attached to the `root_ub` field:
256256 ast:: expr_while( cond, ref body) => {
257257 // during the condition, can only root for the condition
258258 this. push_repeating_id ( cond. id ) ;
259- ( vt. visit_expr ) ( cond, this, vt) ;
259+ ( vt. visit_expr ) ( cond, ( this, vt) ) ;
260260 this. pop_repeating_id ( cond. id ) ;
261261
262262 // during body, can only root for the body
263263 this. push_repeating_id ( body. node . id ) ;
264- ( vt. visit_block ) ( body, this, vt) ;
264+ ( vt. visit_block ) ( body, ( this, vt) ) ;
265265 this. pop_repeating_id ( body. node . id ) ;
266266 }
267267
268268 // see explanation attached to the `root_ub` field:
269269 ast:: expr_loop( ref body, _) => {
270270 this. push_repeating_id ( body. node . id ) ;
271- visit:: visit_expr ( ex, this, vt) ;
271+ visit:: visit_expr ( ex, ( this, vt) ) ;
272272 this. pop_repeating_id ( body. node . id ) ;
273273 }
274274
275275 ast:: expr_fn_block( * ) => {
276276 gather_moves:: gather_captures ( this. bccx , this. move_data , ex) ;
277- visit:: visit_expr ( ex, this, vt) ;
277+ visit:: visit_expr ( ex, ( this, vt) ) ;
278278 }
279279
280280 _ => {
281- visit:: visit_expr ( ex, this, vt) ;
281+ visit:: visit_expr ( ex, ( this, vt) ) ;
282282 }
283283 }
284284}
@@ -702,13 +702,13 @@ impl GatherLoanCtxt {
702702// Setting up info that preserve needs.
703703// This is just the most convenient place to do it.
704704fn add_stmt_to_map ( stmt : @ast:: stmt ,
705- this : @mut GatherLoanCtxt ,
706- vt : visit:: vt < @mut GatherLoanCtxt > ) {
705+ ( this, vt ) : ( @mut GatherLoanCtxt ,
706+ visit:: vt < @mut GatherLoanCtxt > ) ) {
707707 match stmt. node {
708708 ast:: stmt_expr( _, id) | ast:: stmt_semi( _, id) => {
709709 this. bccx . stmt_map . insert ( id) ;
710710 }
711711 _ => ( )
712712 }
713- visit:: visit_stmt ( stmt, this, vt) ;
713+ visit:: visit_stmt ( stmt, ( this, vt) ) ;
714714}
0 commit comments