Skip to content

Commit 0ef4e86

Browse files
committed
Replace NOTE with FIXME
1 parent c50a9d5 commit 0ef4e86

File tree

10 files changed

+31
-29
lines changed

10 files changed

+31
-29
lines changed

src/librustc/middle/borrowck/check_loans.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ pub impl<'self> CheckLoanCtxt<'self> {
579579
}
580580
}
581581

582-
// NOTE inadequare if/when we permit `move a.b`
582+
// FIXME(#4384) inadequare if/when we permit `move a.b`
583583

584584
// check for a conflicting loan:
585585
for opt_loan_path(cmt).each |&lp| {
@@ -604,7 +604,7 @@ pub impl<'self> CheckLoanCtxt<'self> {
604604
// However, I added it for consistency and lest the system
605605
// should change in the future.
606606
//
607-
// FIXME(#5074) nested method calls
607+
// FIXME(#6268) nested method calls
608608
// self.check_for_conflicting_loans(callee_id);
609609
}
610610
}

src/librustc/middle/borrowck/gather_loans/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ pub impl GatherLoanCtxt {
389389
self.all_loans.push(loan);
390390

391391
// if loan_gen_scope != borrow_id {
392-
// NOTE handle case where gen_scope is not borrow_id
392+
// FIXME(#6268) Nested method calls
393393
//
394394
// Typically, the scope of the loan includes the point at
395395
// which the loan is originated. This

src/librustc/middle/borrowck/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ pub impl BorrowckCtxt {
516516
fmt!("%s in an aliasable location", prefix));
517517
}
518518
mc::AliasableManaged(ast::m_mutbl) => {
519-
// FIXME(#5074) we should prob do this borrow
519+
// FIXME(#6269) reborrow @mut to &mut
520520
self.tcx.sess.span_err(
521521
span,
522522
fmt!("%s in a `@mut` pointer; \

src/librustc/middle/dataflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
808808
self.walk_expr(arg0, in_out, loop_scopes);
809809
self.walk_exprs(args, in_out, loop_scopes);
810810

811-
// FIXME(#5074) nested method calls
811+
// FIXME(#6268) nested method calls
812812
// self.merge_with_entry_set(callee_id, in_out);
813813
// self.dfcx.apply_gen_kill(callee_id, in_out);
814814

src/librustc/middle/region.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ pub fn resolve_expr(expr: @ast::expr, cx: Context, visitor: visit::vt<Context>)
393393
match expr.node {
394394
ast::expr_assign_op(*) | ast::expr_index(*) | ast::expr_binary(*) |
395395
ast::expr_unary(*) | ast::expr_call(*) | ast::expr_method_call(*) => {
396-
// FIXME(#5074) Nested method calls
396+
// FIXME(#6268) Nested method calls
397397
//
398398
// The lifetimes for a call or method call look as follows:
399399
//
@@ -949,7 +949,6 @@ pub fn determine_rp_in_crate(sess: Session,
949949
while cx.worklist.len() != 0 {
950950
let c_id = cx.worklist.pop();
951951
let c_variance = cx.region_paramd_items.get_copy(&c_id);
952-
// NOTE cleanup scopes cause an exaggerated lock here
953952
debug!("popped %d from worklist", c_id);
954953
match cx.dep_map.find(&c_id) {
955954
None => {}

src/librustc/middle/trans/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ pub fn find_bcx_for_scope(bcx: block, scope_id: ast::node_id) -> block {
998998
return bcx_sid
999999
}
10001000

1001-
// NOTE This is messier than it ought to be and not really right
1001+
// FIXME(#6268, #6248) hacky cleanup for nested method calls
10021002
Some(NodeInfo { callee_id: Some(id), _ }) if id == scope_id => {
10031003
return bcx_sid
10041004
}

src/librustc/middle/trans/expr.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ pub fn trans_to_datum(bcx: block, expr: @ast::expr) -> DatumBlock {
250250

251251
let tcx = bcx.tcx();
252252
let unit_ty = ty::sequence_element_type(tcx, datum.ty);
253-
// NOTE prob need to distinguish "auto-slice" from explicit index?
253+
254+
// FIXME(#6272) need to distinguish "auto-slice" from explicit index?
254255
let (bcx, base, len) =
255256
datum.get_vec_base_and_len(bcx, expr.span, expr.id);
256257

src/librustc/middle/trans/reachable.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ fn traverse_def_id(cx: @mut ctx, did: def_id) {
7575
Some(&ast_map::node_item(item, _)) => traverse_public_item(cx, item),
7676
Some(&ast_map::node_method(_, impl_id, _)) => traverse_def_id(cx, impl_id),
7777
Some(&ast_map::node_foreign_item(item, _, _, _)) => {
78-
let cx = &mut *cx; // NOTE reborrow @mut
78+
let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut
7979
cx.rmap.insert(item.id);
8080
}
8181
Some(&ast_map::node_variant(ref v, _, _)) => {
82-
let cx = &mut *cx; // NOTE reborrow @mut
82+
let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut
8383
cx.rmap.insert(v.node.id);
8484
}
8585
_ => ()
@@ -109,7 +109,7 @@ fn traverse_public_item(cx: @mut ctx, item: @item) {
109109
item_foreign_mod(ref nm) => {
110110
if !traverse_exports(cx, item.id) {
111111
for nm.items.each |item| {
112-
let cx = &mut *cx; // NOTE reborrow @mut
112+
let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut
113113
cx.rmap.insert(item.id);
114114
}
115115
}
@@ -127,7 +127,7 @@ fn traverse_public_item(cx: @mut ctx, item: @item) {
127127
attr::find_inline_attr(m.attrs) != attr::ia_none
128128
{
129129
{
130-
let cx = &mut *cx; // NOTE reborrow @mut
130+
let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut
131131
cx.rmap.insert(m.id);
132132
}
133133
traverse_inline_body(cx, &m.body);
@@ -136,7 +136,7 @@ fn traverse_public_item(cx: @mut ctx, item: @item) {
136136
}
137137
item_struct(ref struct_def, _) => {
138138
for struct_def.ctor_id.each |&ctor_id| {
139-
let cx = &mut *cx; // NOTE reborrow @mut
139+
let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut
140140
cx.rmap.insert(ctor_id);
141141
}
142142
}
@@ -153,7 +153,7 @@ fn traverse_public_item(cx: @mut ctx, item: @item) {
153153
154154
fn traverse_ty<'a>(ty: @Ty, cx: @mut ctx<'a>, v: visit::vt<@mut ctx<'a>>) {
155155
{
156-
let cx = &mut *cx; // NOTE reborrow @mut
156+
let cx = &mut *cx; // FIXME(#6269) reborrow @mut to &mut
157157
if cx.rmap.contains(&ty.id) { return; }
158158
cx.rmap.insert(ty.id);
159159
}

src/librustc/middle/typeck/check/mod.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1301,12 +1301,11 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
13011301
// Store the type of `f` as the type of the callee
13021302
let fn_ty = fcx.expr_ty(f);
13031303

1304-
// NOTE here we write the callee type before regions have been
1305-
// substituted; in the method case, we write the type after
1306-
// regions have been substituted. Methods are correct, but it
1307-
// is awkward to deal with this now. Best thing would I think
1308-
// be to just have a separate "callee table" that contains the
1309-
// FnSig and not a general purpose ty::t
1304+
// FIXME(#6273) should write callee type AFTER regions have
1305+
// been subst'd. However, it is awkward to deal with this
1306+
// now. Best thing would I think be to just have a separate
1307+
// "callee table" that contains the FnSig and not a general
1308+
// purpose ty::t
13101309
fcx.write_ty(call_expr.callee_id, fn_ty);
13111310

13121311
// Extract the function signature from `in_fty`.

src/librustc/middle/typeck/check/regionck.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,17 @@ pub fn regionck_fn(fcx: @mut FnCtxt, blk: &ast::blk) {
157157
}
158158

159159
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.
160167
visit::mk_vt(@visit::Visitor {visit_item: visit_item,
161168
visit_expr: visit_expr,
162169

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
168171
visit_arm: visit_arm,
169172
visit_local: visit_local,
170173

@@ -294,7 +297,7 @@ fn visit_expr(expr: @ast::expr, rcx: @mut Rcx, v: rvt) {
294297
// Require that the resulting region encompasses
295298
// the current node.
296299
//
297-
// FIXME(#5074) remove to support nested method calls
300+
// FIXME(#6268) remove to support nested method calls
298301
constrain_regions_in_type_of_node(
299302
rcx, expr.id, ty::re_scope(expr.id), expr.span);
300303
}
@@ -374,7 +377,7 @@ fn visit_expr(expr: @ast::expr, rcx: @mut Rcx, v: rvt) {
374377
// the type of the node expr.id here *before applying
375378
// adjustments*.
376379
//
377-
// FIXME(#5074) nested method calls requires that this rule change
380+
// FIXME(#6268) nested method calls requires that this rule change
378381
let ty0 = rcx.resolve_node_type(expr.id);
379382
constrain_regions_in_type(rcx, ty::re_scope(expr.id), expr.span, ty0);
380383
}
@@ -462,7 +465,7 @@ fn constrain_call(rcx: @mut Rcx,
462465
// `callee_region` is the scope representing the time in which the
463466
// call occurs.
464467
//
465-
// FIXME(#5074) to support nested method calls, should be callee_id
468+
// FIXME(#6268) to support nested method calls, should be callee_id
466469
let callee_scope = call_expr.id;
467470
let callee_region = ty::re_scope(callee_scope);
468471

0 commit comments

Comments
 (0)