diff --git a/src/cargo/cargo.rs b/src/cargo/cargo.rs index 290d2180c86..5d543d291d8 100644 --- a/src/cargo/cargo.rs +++ b/src/cargo/cargo.rs @@ -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); } } diff --git a/src/rustc/middle/trans/base.rs b/src/rustc/middle/trans/base.rs index 4d579d648f3..e61a1e9543a 100644 --- a/src/rustc/middle/trans/base.rs +++ b/src/rustc/middle/trans/base.rs @@ -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)); } diff --git a/src/rustc/middle/tstate/auxiliary.rs b/src/rustc/middle/tstate/auxiliary.rs index 6cd5072667c..343fd07a1d5 100644 --- a/src/rustc/middle/tstate/auxiliary.rs +++ b/src/rustc/middle/tstate/auxiliary.rs @@ -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); diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs index ad24be13ca3..4e69bba7ecc 100644 --- a/src/test/bench/shootout-mandelbrot.rs +++ b/src/test/bench/shootout-mandelbrot.rs @@ -119,7 +119,10 @@ fn writer(path: str, writech: comm::chan>, 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;