Workarounds for bug #2280: add some temporaries for borrowing.
This commit is contained in:
parent
e7dbf42214
commit
929c3dd710
@ -423,7 +423,10 @@ fn configure(opts: options) -> cargo {
|
||||
|
||||
fn for_each_package(c: cargo, b: fn(source, package)) {
|
||||
for c.sources.each_value {|v|
|
||||
for vec::each(copy v.packages) {|p|
|
||||
// FIXME (#2280): this temporary shouldn't be
|
||||
// necessary, but seems to be, for borrowing.
|
||||
let pks = copy v.packages;
|
||||
for vec::each(pks) {|p|
|
||||
b(v, p);
|
||||
}
|
||||
}
|
||||
|
@ -5096,7 +5096,10 @@ fn trans_crate(sess: session::session, crate: @ast::crate, tcx: ty::ctxt,
|
||||
io::println(#fmt("n_null_glues: %u", ccx.stats.n_null_glues));
|
||||
io::println(#fmt("n_real_glues: %u", ccx.stats.n_real_glues));
|
||||
|
||||
for vec::each(copy *ccx.stats.fn_times) {|timing|
|
||||
// FIXME (#2280): this temporary shouldn't be
|
||||
// necessary, but seems to be, for borrowing.
|
||||
let times = copy *ccx.stats.fn_times;
|
||||
for vec::each(times) {|timing|
|
||||
io::println(#fmt("time: %s took %d ms", timing.ident,
|
||||
timing.time));
|
||||
}
|
||||
|
@ -727,7 +727,10 @@ fn find_instances(_fcx: fn_ctxt, subst: subst, c: constraint) ->
|
||||
alt c {
|
||||
cinit(_, _, _) {/* this is dealt with separately */ }
|
||||
cpred(p, descs) {
|
||||
for vec::each(copy *descs) {|d|
|
||||
// FIXME (#2280): this temporary shouldn't be
|
||||
// necessary, but seems to be, for borrowing.
|
||||
let ds = copy *descs;
|
||||
for vec::each(ds) {|d|
|
||||
if args_mention(d.node.args, find_in_subst_bool, subst) {
|
||||
let old_bit_num = d.node.bit_num;
|
||||
let newv = replace(subst, d);
|
||||
|
@ -119,7 +119,10 @@ fn writer(path: str, writech: comm::chan<comm::chan<line>>, size: uint)
|
||||
while prev <= i {
|
||||
if lines.contains_key(prev) {
|
||||
#debug("WS %u", prev);
|
||||
cout.write(lines.get(prev));
|
||||
// FIXME (#2280): this temporary shouldn't be
|
||||
// necessary, but seems to be, for borrowing.
|
||||
let v : [u8] = lines.get(prev);
|
||||
cout.write(v);
|
||||
done += 1_u;
|
||||
lines.remove(prev);
|
||||
prev += 1_u;
|
||||
|
Loading…
Reference in New Issue
Block a user