diff --git a/src/cargo/cargo.rs b/src/cargo/cargo.rs index fcb599fd9ef..7c4ada9baa7 100644 --- a/src/cargo/cargo.rs +++ b/src/cargo/cargo.rs @@ -316,7 +316,7 @@ fn load_crate(filename: str) -> option { alt *attr_name { "std" | "core" { } - _ { e.deps += [query]; } + _ { vec::push(e.deps, query); } } } _ { } @@ -775,7 +775,7 @@ fn install_source(c: cargo, path: str) { let mut cratefiles = []; for os::walk_dir(".") {|p| if str::ends_with(p, ".rc") { - cratefiles += [p]; + vec::push(cratefiles, p); } } diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 079fba0ba65..06428a993d2 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -139,7 +139,7 @@ fn make_tests(config: config) -> [test::test_desc] { let file = file; #debug("inspecting file %s", file); if is_test(config, file) { - tests += [make_test(config, file)] + vec::push(tests, make_test(config, file)) } } ret tests; diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 3c33aec270f..642e2073e6b 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -31,7 +31,7 @@ fn load_props(testfile: str) -> test_props { let mut pp_exact = option::none; for iter_header(testfile) {|ln| alt parse_error_pattern(ln) { - option::some(ep) { error_patterns += [ep]; } + option::some(ep) { vec::push(error_patterns, ep) } option::none { } }; @@ -44,11 +44,11 @@ fn load_props(testfile: str) -> test_props { } option::iter(parse_aux_build(ln)) {|ab| - aux_builds += [ab]; + vec::push(aux_builds, ab); } option::iter(parse_exec_env(ln)) {|ee| - exec_env += [ee]; + vec::push(exec_env, ee); } }; ret { diff --git a/src/compiletest/procsrv.rs b/src/compiletest/procsrv.rs index 5d015ead4c5..b3344bece7a 100644 --- a/src/compiletest/procsrv.rs +++ b/src/compiletest/procsrv.rs @@ -19,7 +19,7 @@ fn target_env(lib_path: str, prog: str) -> [(str,str)] { else { (k,v) } }; if str::ends_with(prog, "rustc.exe") { - env += [("RUST_THREADS", "1")] + vec::push(env, ("RUST_THREADS", "1")); } ret env; } diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 5afe663f23b..749af7d9f73 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -104,7 +104,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: str) { procres); } - srcs += [procres.stdout]; + vec::push(srcs, procres.stdout); round += 1; } diff --git a/src/fuzzer/cycles.rs b/src/fuzzer/cycles.rs index e604d4a2357..4773a331c13 100644 --- a/src/fuzzer/cycles.rs +++ b/src/fuzzer/cycles.rs @@ -62,7 +62,7 @@ fn test_cycles(r : rand::rng, k: uint, n: uint) // Create a graph with no edges range(0u, vlen) {|_i| - v += [mut empty_pointy()]; + vec::push(v, empty_pointy()); } // Fill in the graph with random edges, with density k/n @@ -77,7 +77,7 @@ fn test_cycles(r : rand::rng, k: uint, n: uint) // https://github.com/mozilla/rust/issues/1899 if (likelihood(r, k, n)) { v[i].m = [p(choice(r, v))]; } - if (likelihood(r, k, n)) { v[i].n += [mut p(choice(r, v))]; } + if (likelihood(r, k, n)) { vec::push(v[i].n, mut p(choice(r, v))); } if (likelihood(r, k, n)) { v[i].o = {x: 0, y: p(choice(r, v))}; } } diff --git a/src/fuzzer/fuzzer.rs b/src/fuzzer/fuzzer.rs index 95abb6636a8..7c59ceeef00 100644 --- a/src/fuzzer/fuzzer.rs +++ b/src/fuzzer/fuzzer.rs @@ -129,7 +129,7 @@ fn stash_ty_if(c: fn@(@ast::ty, test_mode)->bool, e: @ast::ty, tm: test_mode) { if c(e, tm) { - *es += [*e]; + vec::push(*es,*e); } else {/* now my indices are wrong :( */ } } diff --git a/src/fuzzer/ivec_fuzz.rs b/src/fuzzer/ivec_fuzz.rs index ed02550bb13..9ea4d888fb2 100644 --- a/src/fuzzer/ivec_fuzz.rs +++ b/src/fuzzer/ivec_fuzz.rs @@ -57,11 +57,11 @@ fn vec_edits(v: [T], xs: [T]) -> [[T]] { if Lv != 1u { // When Lv == 1u, this is redundant with omit. - edits += [[]]; + vec::push(edits, []); } if Lv >= 3u { // When Lv == 2u, this is redundant with swap. - edits += [vec::reversed(v)]; + vec::push(edits, vec::reversed(v)); } ix(0u, 1u, Lv) {|i| edits += [vec_omit(v, i)]; } ix(0u, 1u, Lv) {|i| edits += [vec_dup(v, i)]; } @@ -71,10 +71,10 @@ fn vec_edits(v: [T], xs: [T]) -> [[T]] { ix(0u, 1u, len(xs)) {|j| ix(0u, 1u, Lv) {|i| - edits += [vec_poke(v, i, xs[j])]; + vec::push(edits, vec_poke(v, i, xs[j])); } ix(0u, 0u, Lv) {|i| - edits += [vec_insert(v, i, xs[j])]; + vec::push(edits, vec_insert(v, i, xs[j])); } } diff --git a/src/fuzzer/rand_util.rs b/src/fuzzer/rand_util.rs index 1a51ab0cd41..3f5c00c313f 100644 --- a/src/fuzzer/rand_util.rs +++ b/src/fuzzer/rand_util.rs @@ -62,7 +62,7 @@ fn weighted_vec(v : [weighted]) -> [T] { for {weight: weight, item: item} in v { let i = 0u; while i < weight { - r += [item]; + vec::push(r, item); i += 1u; } }