diff --git a/src/librustc/middle/borrowck/check_loans.rs b/src/librustc/middle/borrowck/check_loans.rs index b9a3f4bd6fc..ba719fe34d7 100644 --- a/src/librustc/middle/borrowck/check_loans.rs +++ b/src/librustc/middle/borrowck/check_loans.rs @@ -579,7 +579,7 @@ pub impl<'self> CheckLoanCtxt<'self> { } } - // NOTE inadequare if/when we permit `move a.b` + // FIXME(#4384) inadequare if/when we permit `move a.b` // check for a conflicting loan: for opt_loan_path(cmt).each |&lp| { @@ -604,7 +604,7 @@ pub impl<'self> CheckLoanCtxt<'self> { // However, I added it for consistency and lest the system // should change in the future. // - // FIXME(#5074) nested method calls + // FIXME(#6268) nested method calls // self.check_for_conflicting_loans(callee_id); } } diff --git a/src/librustc/middle/borrowck/gather_loans/mod.rs b/src/librustc/middle/borrowck/gather_loans/mod.rs index 922af0cadec..5f3c5d977fe 100644 --- a/src/librustc/middle/borrowck/gather_loans/mod.rs +++ b/src/librustc/middle/borrowck/gather_loans/mod.rs @@ -389,7 +389,7 @@ pub impl GatherLoanCtxt { self.all_loans.push(loan); // if loan_gen_scope != borrow_id { - // NOTE handle case where gen_scope is not borrow_id + // FIXME(#6268) Nested method calls // // Typically, the scope of the loan includes the point at // which the loan is originated. This diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs index c9a4de38307..68e70d245f7 100644 --- a/src/librustc/middle/borrowck/mod.rs +++ b/src/librustc/middle/borrowck/mod.rs @@ -516,7 +516,7 @@ pub impl BorrowckCtxt { fmt!("%s in an aliasable location", prefix)); } mc::AliasableManaged(ast::m_mutbl) => { - // FIXME(#5074) we should prob do this borrow + // FIXME(#6269) reborrow @mut to &mut self.tcx.sess.span_err( span, fmt!("%s in a `@mut` pointer; \ diff --git a/src/librustc/middle/dataflow.rs b/src/librustc/middle/dataflow.rs index 9d032a1839e..ccb34851046 100644 --- a/src/librustc/middle/dataflow.rs +++ b/src/librustc/middle/dataflow.rs @@ -808,7 +808,7 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> { self.walk_expr(arg0, in_out, loop_scopes); self.walk_exprs(args, in_out, loop_scopes); - // FIXME(#5074) nested method calls + // FIXME(#6268) nested method calls // self.merge_with_entry_set(callee_id, in_out); // self.dfcx.apply_gen_kill(callee_id, in_out); diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 5834ae1d780..cdc3aa9fedb 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -393,7 +393,7 @@ pub fn resolve_expr(expr: @ast::expr, cx: Context, visitor: visit::vt) match expr.node { ast::expr_assign_op(*) | ast::expr_index(*) | ast::expr_binary(*) | ast::expr_unary(*) | ast::expr_call(*) | ast::expr_method_call(*) => { - // FIXME(#5074) Nested method calls + // FIXME(#6268) Nested method calls // // The lifetimes for a call or method call look as follows: // @@ -949,7 +949,6 @@ pub fn determine_rp_in_crate(sess: Session, while cx.worklist.len() != 0 { let c_id = cx.worklist.pop(); let c_variance = cx.region_paramd_items.get_copy(&c_id); - // NOTE cleanup scopes cause an exaggerated lock here debug!("popped %d from worklist", c_id); match cx.dep_map.find(&c_id) { None => {} diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs index 90dd9103011..34f798ec7a6 100644 --- a/src/librustc/middle/trans/base.rs +++ b/src/librustc/middle/trans/base.rs @@ -998,7 +998,7 @@ pub fn find_bcx_for_scope(bcx: block, scope_id: ast::node_id) -> block { return bcx_sid } - // NOTE This is messier than it ought to be and not really right + // FIXME(#6268, #6248) hacky cleanup for nested method calls Some(NodeInfo { callee_id: Some(id), _ }) if id == scope_id => { return bcx_sid } diff --git a/src/librustc/middle/trans/expr.rs b/src/librustc/middle/trans/expr.rs index 6f1dbd8c2fe..0e8b2e04746 100644 --- a/src/librustc/middle/trans/expr.rs +++ b/src/librustc/middle/trans/expr.rs @@ -250,7 +250,8 @@ pub fn trans_to_datum(bcx: block, expr: @ast::expr) -> DatumBlock { let tcx = bcx.tcx(); let unit_ty = ty::sequence_element_type(tcx, datum.ty); - // NOTE prob need to distinguish "auto-slice" from explicit index? + + // FIXME(#6272) need to distinguish "auto-slice" from explicit index? let (bcx, base, len) = datum.get_vec_base_and_len(bcx, expr.span, expr.id); diff --git a/src/librustc/middle/trans/reachable.rs b/src/librustc/middle/trans/reachable.rs index 1dd73f76da7..9bbf50397c3 100644 --- a/src/librustc/middle/trans/reachable.rs +++ b/src/librustc/middle/trans/reachable.rs @@ -75,11 +75,11 @@ fn traverse_def_id(cx: @mut ctx, did: def_id) { Some(&ast_map::node_item(item, _)) => traverse_public_item(cx, item), Some(&ast_map::node_method(_, impl_id, _)) => traverse_def_id(cx, impl_id), Some(&ast_map::node_foreign_item(item, _, _, _)) => { - let cx = &mut *cx; // NOTE reborrow @mut + let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut cx.rmap.insert(item.id); } Some(&ast_map::node_variant(ref v, _, _)) => { - let cx = &mut *cx; // NOTE reborrow @mut + let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut cx.rmap.insert(v.node.id); } _ => () @@ -109,7 +109,7 @@ fn traverse_public_item(cx: @mut ctx, item: @item) { item_foreign_mod(ref nm) => { if !traverse_exports(cx, item.id) { for nm.items.each |item| { - let cx = &mut *cx; // NOTE reborrow @mut + let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut cx.rmap.insert(item.id); } } @@ -127,7 +127,7 @@ fn traverse_public_item(cx: @mut ctx, item: @item) { attr::find_inline_attr(m.attrs) != attr::ia_none { { - let cx = &mut *cx; // NOTE reborrow @mut + let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut cx.rmap.insert(m.id); } traverse_inline_body(cx, &m.body); @@ -136,7 +136,7 @@ fn traverse_public_item(cx: @mut ctx, item: @item) { } item_struct(ref struct_def, _) => { for struct_def.ctor_id.each |&ctor_id| { - let cx = &mut *cx; // NOTE reborrow @mut + let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut cx.rmap.insert(ctor_id); } } @@ -153,7 +153,7 @@ fn traverse_public_item(cx: @mut ctx, item: @item) { fn traverse_ty<'a>(ty: @Ty, cx: @mut ctx<'a>, v: visit::vt<@mut ctx<'a>>) { { - let cx = &mut *cx; // NOTE reborrow @mut + let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut if cx.rmap.contains(&ty.id) { return; } cx.rmap.insert(ty.id); } diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index 7e63db89edb..e171765ef6c 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -1301,12 +1301,11 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt, // Store the type of `f` as the type of the callee let fn_ty = fcx.expr_ty(f); - // NOTE here we write the callee type before regions have been - // substituted; in the method case, we write the type after - // regions have been substituted. Methods are correct, but it - // is awkward to deal with this now. Best thing would I think - // be to just have a separate "callee table" that contains the - // FnSig and not a general purpose ty::t + // FIXME(#6273) should write callee type AFTER regions have + // been subst'd. However, it is awkward to deal with this + // now. Best thing would I think be to just have a separate + // "callee table" that contains the FnSig and not a general + // purpose ty::t fcx.write_ty(call_expr.callee_id, fn_ty); // Extract the function signature from `in_fty`. diff --git a/src/librustc/middle/typeck/check/regionck.rs b/src/librustc/middle/typeck/check/regionck.rs index 03dd32353db..491c7fadb18 100644 --- a/src/librustc/middle/typeck/check/regionck.rs +++ b/src/librustc/middle/typeck/check/regionck.rs @@ -157,14 +157,17 @@ pub fn regionck_fn(fcx: @mut FnCtxt, blk: &ast::blk) { } fn regionck_visitor() -> rvt { + // FIXME(#3238) should use visit_pat, not visit_arm/visit_local, + // However, right now we run into an issue whereby some free + // regions are not properly related if they appear within the + // types of arguments that must be inferred. This could be + // addressed by deferring the construction of the region + // hierarchy, and in particular the relationships between free + // regions, until regionck, as described in #3238. visit::mk_vt(@visit::Visitor {visit_item: visit_item, visit_expr: visit_expr, - // NOTE this should be visit_pat - // but causes errors in formal - // arguments in closures due to - // #XYZ! - //visit_pat: visit_pat, + //visit_pat: visit_pat, // (*) see FIXME above visit_arm: visit_arm, visit_local: visit_local, @@ -294,7 +297,7 @@ fn visit_expr(expr: @ast::expr, rcx: @mut Rcx, v: rvt) { // Require that the resulting region encompasses // the current node. // - // FIXME(#5074) remove to support nested method calls + // FIXME(#6268) remove to support nested method calls constrain_regions_in_type_of_node( rcx, expr.id, ty::re_scope(expr.id), expr.span); } @@ -374,7 +377,7 @@ fn visit_expr(expr: @ast::expr, rcx: @mut Rcx, v: rvt) { // the type of the node expr.id here *before applying // adjustments*. // - // FIXME(#5074) nested method calls requires that this rule change + // FIXME(#6268) nested method calls requires that this rule change let ty0 = rcx.resolve_node_type(expr.id); constrain_regions_in_type(rcx, ty::re_scope(expr.id), expr.span, ty0); } @@ -462,7 +465,7 @@ fn constrain_call(rcx: @mut Rcx, // `callee_region` is the scope representing the time in which the // call occurs. // - // FIXME(#5074) to support nested method calls, should be callee_id + // FIXME(#6268) to support nested method calls, should be callee_id let callee_scope = call_expr.id; let callee_region = ty::re_scope(callee_scope);