@@ -157,14 +157,17 @@ pub fn regionck_fn(fcx: @mut FnCtxt, blk: &ast::blk) {
157
157
}
158
158
159
159
fn regionck_visitor ( ) -> rvt {
160
+ // FIXME(#3238) should use visit_pat, not visit_arm/visit_local,
161
+ // However, right now we run into an issue whereby some free
162
+ // regions are not properly related if they appear within the
163
+ // types of arguments that must be inferred. This could be
164
+ // addressed by deferring the construction of the region
165
+ // hierarchy, and in particular the relationships between free
166
+ // regions, until regionck, as described in #3238.
160
167
visit:: mk_vt ( @visit:: Visitor { visit_item : visit_item,
161
168
visit_expr : visit_expr,
162
169
163
- // NOTE this should be visit_pat
164
- // but causes errors in formal
165
- // arguments in closures due to
166
- // #XYZ!
167
- //visit_pat: visit_pat,
170
+ //visit_pat: visit_pat, // (*) see FIXME above
168
171
visit_arm : visit_arm,
169
172
visit_local : visit_local,
170
173
@@ -294,7 +297,7 @@ fn visit_expr(expr: @ast::expr, rcx: @mut Rcx, v: rvt) {
294
297
// Require that the resulting region encompasses
295
298
// the current node.
296
299
//
297
- // FIXME(#5074 ) remove to support nested method calls
300
+ // FIXME(#6268 ) remove to support nested method calls
298
301
constrain_regions_in_type_of_node(
299
302
rcx, expr. id, ty:: re_scope( expr. id) , expr. span) ;
300
303
}
@@ -374,7 +377,7 @@ fn visit_expr(expr: @ast::expr, rcx: @mut Rcx, v: rvt) {
374
377
// the type of the node expr.id here *before applying
375
378
// adjustments*.
376
379
//
377
- // FIXME(#5074 ) nested method calls requires that this rule change
380
+ // FIXME(#6268 ) nested method calls requires that this rule change
378
381
let ty0 = rcx. resolve_node_type ( expr. id ) ;
379
382
constrain_regions_in_type ( rcx, ty:: re_scope ( expr. id ) , expr. span , ty0) ;
380
383
}
@@ -462,7 +465,7 @@ fn constrain_call(rcx: @mut Rcx,
462
465
// `callee_region` is the scope representing the time in which the
463
466
// call occurs.
464
467
//
465
- // FIXME(#5074 ) to support nested method calls, should be callee_id
468
+ // FIXME(#6268 ) to support nested method calls, should be callee_id
466
469
let callee_scope = call_expr. id ;
467
470
let callee_region = ty:: re_scope ( callee_scope) ;
468
471
0 commit comments