parent
759fc101fb
commit
a3a27374bd
|
@ -4091,7 +4091,7 @@ fn trans_rec(bcx: @block_ctxt, fields: [ast::field],
|
|||
for tf in ty_fields {
|
||||
let dst = GEP_tup_like_1(bcx, t, addr, [0, i]);
|
||||
bcx = dst.bcx;
|
||||
// FIXME make this {|f| str::eq(f.node.ident, tf.ident)} again when
|
||||
// FIXME make this again when
|
||||
// bug #913 is fixed
|
||||
fn test(n: str, f: ast::field) -> bool { str::eq(f.node.ident, n) }
|
||||
alt vec::find(bind test(tf.ident, _), fields) {
|
||||
|
|
|
@ -150,7 +150,8 @@ fn relax_precond_block(fcx: fn_ctxt, i: node_id, b: blk) {
|
|||
visit_expr: relax_precond_expr,
|
||||
visit_stmt: relax_precond_stmt,
|
||||
visit_item:
|
||||
fn (_i: @item, _cx: relax_ctxt, _vt: visit::vt<relax_ctxt>) { }
|
||||
fn (_i: @item, _cx: relax_ctxt, _vt: visit::vt<relax_ctxt>) { },
|
||||
visit_fn: do_nothing
|
||||
with *visitor};
|
||||
let v1 = visit::mk_vt(visitor);
|
||||
v1.visit_block(b, cx, v1);
|
||||
|
|
|
@ -130,19 +130,14 @@ fn mk_fn_info(ccx: crate_ctxt, f: _fn, tp: [ty_param], f_sp: span,
|
|||
// "diverges" constraint
|
||||
let diverges_id = ccx.tcx.sess.next_node_id();
|
||||
let diverges_name = name + "!";
|
||||
add_constraint(cx.tcx, respan(f_sp, ninit(diverges_id, diverges_name)),
|
||||
next, res_map);
|
||||
next = add_constraint(cx.tcx, respan(f_sp, ninit(diverges_id,
|
||||
diverges_name)),
|
||||
next, res_map);
|
||||
|
||||
let v: @mutable [node_id] = @mutable [];
|
||||
let rslt =
|
||||
{constrs: res_map,
|
||||
|
||||
// add 2 to account for the i_return and i_diverge constraints
|
||||
// FIXME the 1u here is a kludge to make bug #913's impact somewhat
|
||||
// smaller. it should be removed once the bug is really fixed
|
||||
num_constraints:
|
||||
vec::len(*cx.cs) + vec::len(f.decl.constraints) +
|
||||
vec::len(f.decl.inputs) + 2u + 1u,
|
||||
num_constraints: next,
|
||||
cf: f.decl.cf,
|
||||
i_return: ninit(id, name),
|
||||
i_diverge: ninit(diverges_id, diverges_name),
|
||||
|
|
Loading…
Reference in New Issue