about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/etc/combine-tests.py4
-rw-r--r--src/fuzzer/fuzzer.rs9
-rw-r--r--src/test/bench/shootout-fannkuchredux.rs2
-rw-r--r--src/test/bench/shootout-fasta.rs2
-rw-r--r--src/test/bench/shootout-pfib.rs9
-rw-r--r--src/test/bench/task-perf-spawnalot.rs7
-rw-r--r--src/test/bench/task-perf-word-count.rs9
-rw-r--r--src/test/compile-fail/bad-expr-path.rs2
-rw-r--r--src/test/compile-fail/bad-expr-path2.rs2
-rw-r--r--src/test/compile-fail/import.rs2
-rw-r--r--src/test/compile-fail/import2.rs2
-rw-r--r--src/test/compile-fail/import3.rs2
-rw-r--r--src/test/compile-fail/import4.rs2
-rw-r--r--src/test/compiletest/compiletest.rs6
-rw-r--r--src/test/run-pass/argv.rs7
-rw-r--r--src/test/run-pass/command-line-args.rs2
-rw-r--r--src/test/run-pass/import4.rs2
-rw-r--r--src/test/run-pass/import5.rs2
-rw-r--r--src/test/run-pass/import7.rs2
-rw-r--r--src/test/run-pass/iter-ret.rs2
-rw-r--r--src/test/run-pass/native2.rs2
-rw-r--r--src/test/run-pass/path.rs2
-rw-r--r--src/test/run-pass/tag-in-block.rs2
-rw-r--r--src/test/run-pass/type-param.rs2
-rw-r--r--src/test/run-pass/type-ptr.rs2
25 files changed, 39 insertions, 48 deletions
diff --git a/src/etc/combine-tests.py b/src/etc/combine-tests.py
index db9229b3f68..5ea8459de88 100755
--- a/src/etc/combine-tests.py
+++ b/src/etc/combine-tests.py
@@ -29,7 +29,7 @@ for t in os.listdir(run_pass):
         if not ("xfail-stage2" in s or
                 "xfail-fast" in s):
             stage2_tests.append(t)
-            if "main(args: vec[str])" in s:
+            if "main(args: [str])" in s:
                 take_args[t] = True
         f.close()
 
@@ -60,7 +60,7 @@ for t in stage2_tests:
     p = p.replace("\\", "\\\\")
     d.write("    out.write_str(\"run-pass [stage2]: %s\\n\");\n" % p)
     if t in take_args:
-        d.write("    t_%d::main([\"arg0\"]);\n" % i)
+        d.write("    t_%d::main(~[\"arg0\"]);\n" % i)
     else:
         d.write("    t_%d::main();\n" % i)
     i += 1
diff --git a/src/fuzzer/fuzzer.rs b/src/fuzzer/fuzzer.rs
index f98641fee49..971cedae1cf 100644
--- a/src/fuzzer/fuzzer.rs
+++ b/src/fuzzer/fuzzer.rs
@@ -345,14 +345,13 @@ fn check_variants(files: &[str]) {
     }
 }
 
-fn main(args: vec[str]) {
-    let iargs = ivec::from_vec(args);
-    if ivec::len(iargs) != 2u {
-        log_err #fmt("usage: %s <testdir>", iargs.(0));
+fn main(args: [str]) {
+    if ivec::len(args) != 2u {
+        log_err #fmt("usage: %s <testdir>", args.(0));
         ret;
     }
     let files = ~[];
-    let root = iargs.(1);
+    let root = args.(1);
 
     find_rust_files(files, root);
     check_convergence(files);
diff --git a/src/test/bench/shootout-fannkuchredux.rs b/src/test/bench/shootout-fannkuchredux.rs
index e2841f499b9..ae5831f5cb0 100644
--- a/src/test/bench/shootout-fannkuchredux.rs
+++ b/src/test/bench/shootout-fannkuchredux.rs
@@ -56,7 +56,7 @@ fn fannkuch(n: int) -> int {
     ret flips;
 }
 
-fn main(args: vec[str]) {
+fn main(args: [str]) {
     let n = 7;
     log #fmt("Pfannkuchen(%d) = %d", n, fannkuch(n));
 }
\ No newline at end of file
diff --git a/src/test/bench/shootout-fasta.rs b/src/test/bench/shootout-fasta.rs
index 38f51fa65be..bdb3143328d 100644
--- a/src/test/bench/shootout-fasta.rs
+++ b/src/test/bench/shootout-fasta.rs
@@ -67,7 +67,7 @@ fn make_repeat_fasta(id: str, desc: str, s: str, n: int) {
 
 fn acid(ch: char, prob: u32) -> aminoacids { ret {ch: ch, prob: prob}; }
 
-fn main(args: vec[str]) {
+fn main(args: [str]) {
     let iub: [aminoacids] =
         make_cumulative(
             ~[acid('a', 27u32), acid('c', 12u32), acid('g', 12u32),
diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs
index 4c41c1f05b7..ff48f62efd7 100644
--- a/src/test/bench/shootout-pfib.rs
+++ b/src/test/bench/shootout-pfib.rs
@@ -79,20 +79,19 @@ fn stress(num_tasks: int) {
     for t in tasks { task::join_id(t); }
 }
 
-fn main(argv: vec[str]) {
-    let iargv = ivec::from_vec(argv);
-    if ivec::len(iargv) == 1u {
+fn main(argv: [str]) {
+    if ivec::len(argv) == 1u {
         assert (fib(8) == 21);
         log fib(8);
     } else {
         // Interactive mode! Wooo!!!!
-        let opts = parse_opts(iargv);
+        let opts = parse_opts(argv);
 
 
         if opts.stress {
             stress(2);
         } else {
-            let max = uint::parse_buf(str::bytes(iargv.(1)), 10u) as int;
+            let max = uint::parse_buf(str::bytes(argv.(1)), 10u) as int;
 
             let num_trials = 10;
 
diff --git a/src/test/bench/task-perf-spawnalot.rs b/src/test/bench/task-perf-spawnalot.rs
index b7d9e07022e..4e2cf2bcf75 100644
--- a/src/test/bench/task-perf-spawnalot.rs
+++ b/src/test/bench/task-perf-spawnalot.rs
@@ -14,13 +14,12 @@ fn f(n: uint) {
 
 fn g() {}
 
-fn main(args: vec[str]) {
+fn main(args: [str]) {
 
-    let iargs = ivec::from_vec(args);
-    let n = if ivec::len(iargs) < 2u {
+    let n = if ivec::len(args) < 2u {
         10u
     } else {
-        uint::parse_buf(str::bytes(iargs.(1)), 10u)
+        uint::parse_buf(str::bytes(args.(1)), 10u)
     };
     let i = 0u;
     while i < n {
diff --git a/src/test/bench/task-perf-word-count.rs b/src/test/bench/task-perf-word-count.rs
index c67697f29d4..9a051d28cb9 100644
--- a/src/test/bench/task-perf-word-count.rs
+++ b/src/test/bench/task-perf-word-count.rs
@@ -198,12 +198,11 @@ mod map_reduce {
     }
 }
 
-fn main(argv: vec[str]) {
-    let iargv = ivec::from_vec(argv);
-    if ivec::len(iargv) < 2u {
+fn main(argv: [str]) {
+    if ivec::len(argv) < 2u {
         let out = io::stdout();
 
-        out.write_line(#fmt("Usage: %s <filename> ...", iargv.(0)));
+        out.write_line(#fmt("Usage: %s <filename> ...", argv.(0)));
 
         // TODO: run something just to make sure the code hasn't
         // broken yet. This is the unit test mode of this program.
@@ -217,7 +216,7 @@ fn main(argv: vec[str]) {
 
     let start = time::precise_time_ns();
 
-    map_reduce::map_reduce(ivec::slice(iargv, 1u, ivec::len(iargv)));
+    map_reduce::map_reduce(ivec::slice(argv, 1u, ivec::len(argv)));
     let stop = time::precise_time_ns();
 
     let elapsed = stop - start;
diff --git a/src/test/compile-fail/bad-expr-path.rs b/src/test/compile-fail/bad-expr-path.rs
index 93aa3db1613..86fc40027f9 100644
--- a/src/test/compile-fail/bad-expr-path.rs
+++ b/src/test/compile-fail/bad-expr-path.rs
@@ -2,4 +2,4 @@
 
 mod m1 { }
 
-fn main(args: vec[str]) { log m1::a; }
\ No newline at end of file
+fn main(args: [str]) { log m1::a; }
\ No newline at end of file
diff --git a/src/test/compile-fail/bad-expr-path2.rs b/src/test/compile-fail/bad-expr-path2.rs
index 1498baecb59..9216c000fbf 100644
--- a/src/test/compile-fail/bad-expr-path2.rs
+++ b/src/test/compile-fail/bad-expr-path2.rs
@@ -4,4 +4,4 @@ mod m1 {
     mod a { }
 }
 
-fn main(args: vec[str]) { log m1::a; }
\ No newline at end of file
+fn main(args: [str]) { log m1::a; }
\ No newline at end of file
diff --git a/src/test/compile-fail/import.rs b/src/test/compile-fail/import.rs
index 6667c9a938a..7503a7df91f 100644
--- a/src/test/compile-fail/import.rs
+++ b/src/test/compile-fail/import.rs
@@ -4,4 +4,4 @@ import zed::baz;
 mod zed {
     fn bar() { log "bar"; }
 }
-fn main(args: vec[str]) { bar(); }
\ No newline at end of file
+fn main(args: [str]) { bar(); }
\ No newline at end of file
diff --git a/src/test/compile-fail/import2.rs b/src/test/compile-fail/import2.rs
index 6029aad5dee..2449377f785 100644
--- a/src/test/compile-fail/import2.rs
+++ b/src/test/compile-fail/import2.rs
@@ -4,4 +4,4 @@ mod baz { }
 mod zed {
     fn bar() { log "bar3"; }
 }
-fn main(args: vec[str]) { bar(); }
\ No newline at end of file
+fn main(args: [str]) { bar(); }
\ No newline at end of file
diff --git a/src/test/compile-fail/import3.rs b/src/test/compile-fail/import3.rs
index b4e76affe12..0f8fdcf2636 100644
--- a/src/test/compile-fail/import3.rs
+++ b/src/test/compile-fail/import3.rs
@@ -1,4 +1,4 @@
 // error-pattern: unresolved modulename
 import main::bar;
 
-fn main(args: vec[str]) { log "foo"; }
\ No newline at end of file
+fn main(args: [str]) { log "foo"; }
\ No newline at end of file
diff --git a/src/test/compile-fail/import4.rs b/src/test/compile-fail/import4.rs
index bde87e0da5d..65d8893177f 100644
--- a/src/test/compile-fail/import4.rs
+++ b/src/test/compile-fail/import4.rs
@@ -3,4 +3,4 @@
 import zed::bar;
 import bar::zed;
 
-fn main(args: vec[str]) { log "loop"; }
\ No newline at end of file
+fn main(args: [str]) { log "loop"; }
\ No newline at end of file
diff --git a/src/test/compiletest/compiletest.rs b/src/test/compiletest/compiletest.rs
index 870999e7b04..4c3a30d3952 100644
--- a/src/test/compiletest/compiletest.rs
+++ b/src/test/compiletest/compiletest.rs
@@ -22,11 +22,9 @@ import common::mode_pretty;
 import common::mode;
 import util::logv;
 
-fn main(args: vec[str]) {
+fn main(args: [str]) {
 
-    let ivec_args = ivec::from_vec(args);
-
-    let config = parse_config(ivec_args);
+    let config = parse_config(args);
     log_config(config);
     run_tests(config);
 }
diff --git a/src/test/run-pass/argv.rs b/src/test/run-pass/argv.rs
index c8b1222a200..b0feeff2232 100644
--- a/src/test/run-pass/argv.rs
+++ b/src/test/run-pass/argv.rs
@@ -1,8 +1,5 @@
-use std;
-import std::ivec;
-
-fn main(args: vec[str]) {
+fn main(args: [str]) {
     let vs: [str] = ~["hi", "there", "this", "is", "a", "vec"];
-    let vvs: [[str]] = ~[ivec::from_vec(args), vs];
+    let vvs: [[str]] = ~[args, vs];
     for vs: [str] in vvs { for s: str in vs { log s; } }
 }
diff --git a/src/test/run-pass/command-line-args.rs b/src/test/run-pass/command-line-args.rs
index af42cbd0e3e..5040e6888ab 100644
--- a/src/test/run-pass/command-line-args.rs
+++ b/src/test/run-pass/command-line-args.rs
@@ -1,3 +1,3 @@
 
 
-fn main(args: vec[str]) { log args.(0); }
\ No newline at end of file
+fn main(args: [str]) { log args.(0); }
\ No newline at end of file
diff --git a/src/test/run-pass/import4.rs b/src/test/run-pass/import4.rs
index c9ada05530a..00e5aca8e1c 100644
--- a/src/test/run-pass/import4.rs
+++ b/src/test/run-pass/import4.rs
@@ -5,4 +5,4 @@ mod zed {
     fn bar() { log "bar"; }
 }
 
-fn main(args: vec[str]) { let zed = 42; bar(); }
\ No newline at end of file
+fn main(args: [str]) { let zed = 42; bar(); }
\ No newline at end of file
diff --git a/src/test/run-pass/import5.rs b/src/test/run-pass/import5.rs
index 6fdd6901c82..0be63b38e07 100644
--- a/src/test/run-pass/import5.rs
+++ b/src/test/run-pass/import5.rs
@@ -7,4 +7,4 @@ mod foo {
     }
 }
 
-fn main(args: vec[str]) { bar(); }
\ No newline at end of file
+fn main(args: [str]) { bar(); }
\ No newline at end of file
diff --git a/src/test/run-pass/import7.rs b/src/test/run-pass/import7.rs
index 26a3f68468e..760a3ff37ca 100644
--- a/src/test/run-pass/import7.rs
+++ b/src/test/run-pass/import7.rs
@@ -12,4 +12,4 @@ mod bar {
         mod zed { }
     }
 }
-fn main(args: vec[str]) { baz(); }
\ No newline at end of file
+fn main(args: [str]) { baz(); }
\ No newline at end of file
diff --git a/src/test/run-pass/iter-ret.rs b/src/test/run-pass/iter-ret.rs
index 77edc2c0ec7..b450a34c411 100644
--- a/src/test/run-pass/iter-ret.rs
+++ b/src/test/run-pass/iter-ret.rs
@@ -4,4 +4,4 @@ iter x() -> int { }
 
 fn f() -> bool { for each i: int in x() { ret true; } ret false; }
 
-fn main(args: vec[str]) { f(); }
+fn main(args: [str]) { f(); }
diff --git a/src/test/run-pass/native2.rs b/src/test/run-pass/native2.rs
index e5fe1a1d514..cb4be22508f 100644
--- a/src/test/run-pass/native2.rs
+++ b/src/test/run-pass/native2.rs
@@ -15,4 +15,4 @@ native "cdecl" mod libc = "" {
 
 native "cdecl" mod baz = "" { }
 
-fn main(args: vec[str]) { }
\ No newline at end of file
+fn main(args: [str]) { }
\ No newline at end of file
diff --git a/src/test/run-pass/path.rs b/src/test/run-pass/path.rs
index 9c5319ac2bb..2b3a17ed86d 100644
--- a/src/test/run-pass/path.rs
+++ b/src/test/run-pass/path.rs
@@ -4,4 +4,4 @@ mod foo {
     fn bar(offset: uint) { }
 }
 
-fn main(args: vec[str]) { foo::bar(0u); }
\ No newline at end of file
+fn main(args: [str]) { foo::bar(0u); }
\ No newline at end of file
diff --git a/src/test/run-pass/tag-in-block.rs b/src/test/run-pass/tag-in-block.rs
index 4268940435d..a553103bbd4 100644
--- a/src/test/run-pass/tag-in-block.rs
+++ b/src/test/run-pass/tag-in-block.rs
@@ -6,4 +6,4 @@ fn foo() {
     fn baz() { zed(nil); }
 }
 
-fn main(args: vec[str]) { }
\ No newline at end of file
+fn main(args: [str]) { }
\ No newline at end of file
diff --git a/src/test/run-pass/type-param.rs b/src/test/run-pass/type-param.rs
index 404adc1b4f2..4729d6a4b07 100644
--- a/src/test/run-pass/type-param.rs
+++ b/src/test/run-pass/type-param.rs
@@ -2,4 +2,4 @@
 
 type lteq[T] = fn(&T) -> bool ;
 
-fn main(args: vec[str]) { }
\ No newline at end of file
+fn main(args: [str]) { }
\ No newline at end of file
diff --git a/src/test/run-pass/type-ptr.rs b/src/test/run-pass/type-ptr.rs
index b5cdb0030cc..8c71b5abfb4 100644
--- a/src/test/run-pass/type-ptr.rs
+++ b/src/test/run-pass/type-ptr.rs
@@ -2,4 +2,4 @@ fn f(a: *int) -> *int { ret a; }
 
 fn g(a: *int) -> *int { let b = f(a); ret b; }
 
-fn main(args: vec[str]) { ret; }
\ No newline at end of file
+fn main(args: [str]) { ret; }
\ No newline at end of file