Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove arg vectors from main functions. Stop supporting them.

  • Loading branch information...
commit edc317b8212fe1c29b5e7e2e4e260b9a4d72b447 1 parent e3f458e
@brson brson authored
Showing with 95 additions and 101 deletions.
  1. +2 −1  src/cargo/cargo.rs
  2. +2 −1  src/compiletest/compiletest.rs
  3. +1 −7 src/etc/combine-tests.py
  4. +2 −1  src/fuzzer/fuzzer.rs
  5. +2 −1  src/rustc/driver/rustc.rs
  6. +13 −27 src/rustc/front/test.rs
  7. +4 −16 src/rustc/middle/trans/base.rs
  8. +2 −4 src/rustc/middle/typeck.rs
  9. +2 −1  src/rustdoc/rustdoc.rs
  10. +2 −1  src/test/bench/core-map.rs
  11. +2 −1  src/test/bench/core-std.rs
  12. +2 −1  src/test/bench/core-uint-to-str.rs
  13. +2 −1  src/test/bench/core-vec-append.rs
  14. +2 −1  src/test/bench/graph500-bfs.rs
  15. +2 −1  src/test/bench/msgsend-pipes-shared.rs
  16. +2 −1  src/test/bench/msgsend-pipes.rs
  17. +2 −1  src/test/bench/msgsend-ring-mutex-arcs.rs
  18. +2 −1  src/test/bench/msgsend-ring-pipes.rs
  19. +2 −1  src/test/bench/msgsend-ring-rw-arcs.rs
  20. +2 −1  src/test/bench/msgsend-ring.rs
  21. +2 −1  src/test/bench/msgsend.rs
  22. +2 −1  src/test/bench/shootout-ackermann.rs
  23. +2 −1  src/test/bench/shootout-binarytrees.rs
  24. +2 −1  src/test/bench/shootout-chameneos-redux.rs
  25. +2 −1  src/test/bench/shootout-fannkuchredux.rs
  26. +2 −1  src/test/bench/shootout-fasta.rs
  27. +2 −1  src/test/bench/shootout-fibo.rs
  28. +2 −1  src/test/bench/shootout-k-nucleotide-pipes.rs
  29. +2 −1  src/test/bench/shootout-k-nucleotide.rs
  30. +2 −1  src/test/bench/shootout-mandelbrot.rs
  31. +2 −1  src/test/bench/shootout-nbody.rs
  32. +2 −1  src/test/bench/shootout-pfib.rs
  33. +2 −1  src/test/bench/shootout-spectralnorm.rs
  34. +2 −1  src/test/bench/shootout-threadring.rs
  35. +2 −1  src/test/bench/std-smallintmap.rs
  36. +2 −1  src/test/bench/sudoku.rs
  37. +2 −1  src/test/bench/task-perf-jargon-metal-smoke.rs
  38. +2 −1  src/test/bench/task-perf-linked-failure.rs
  39. +2 −1  src/test/bench/task-perf-one-million.rs
  40. +2 −1  src/test/bench/task-perf-spawnalot.rs
  41. +2 −1  src/test/bench/task-perf-word-count-generic.rs
  42. +1 −1  src/test/compile-fail/bad-main.rs
  43. +0 −5 src/test/run-pass/argv.rs
  44. +0 −3  src/test/run-pass/command-line-args.rs
  45. +0 −1  src/test/run-pass/main-ivec.rs
View
3  src/cargo/cargo.rs
@@ -1889,7 +1889,8 @@ Commands:
set-method Change the method for a source.");
}
-fn main(argv: ~[~str]) {
+fn main() {
+ let argv = os::args();
let o = build_cargo_options(argv);
if vec::len(o.free) < 2u {
View
3  src/compiletest/compiletest.rs
@@ -12,7 +12,8 @@ use common::mode_pretty;
use common::mode;
use util::logv;
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let config = parse_config(args);
log_config(config);
run_tests(config);
View
8 src/etc/combine-tests.py
@@ -19,7 +19,6 @@ def scrub(b):
run_pass = os.path.join(src_dir, "src", "test", "run-pass")
run_pass = os.path.abspath(run_pass)
stage2_tests = []
-take_args = {}
for t in os.listdir(run_pass):
if t.endswith(".rs") and not (
@@ -30,8 +29,6 @@ def scrub(b):
"xfail-fast" in s or
"xfail-win32" in s):
stage2_tests.append(t)
- if "fn main(args:" in s or "fn main(++args:" in s:
- take_args[t] = True
f.close()
stage2_tests.sort()
@@ -64,9 +61,6 @@ def scrub(b):
p = os.path.join("test", "run-pass", t)
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)
- else:
- d.write(" t_%d::main();\n" % i)
+ d.write(" t_%d::main();\n" % i)
i += 1
d.write("}\n")
View
3  src/fuzzer/fuzzer.rs
@@ -599,7 +599,8 @@ fn check_variants(files: &[Path], cx: context) {
}
}
-fn main(args: ~[~str]) {
+fn main() {
+ let args = os::args();
if vec::len(args) != 2u {
error!("usage: %s <testdir>", args[0]);
return;
View
3  src/rustc/driver/rustc.rs
@@ -277,7 +277,8 @@ fn monitor(+f: fn~(diagnostic::emitter)) {
}
}
-fn main(args: ~[~str]) {
+fn main() {
+ let args = os::args();
do monitor |demitter| {
run_compiler(args, demitter);
}
View
40 src/rustc/front/test.rs
@@ -415,34 +415,12 @@ fn mk_test_wrapper(cx: test_ctxt,
}
fn mk_main(cx: test_ctxt) -> @ast::item {
- let str_pt = path_node(~[cx.sess.ident_of(~"str")]);
- let str_ty_inner = @{id: cx.sess.next_node_id(),
- node: ast::ty_path(str_pt, cx.sess.next_node_id()),
- span: dummy_sp()};
- let str_ty = @{id: cx.sess.next_node_id(),
- node: ast::ty_uniq({ty: str_ty_inner, mutbl: ast::m_imm}),
- span: dummy_sp()};
- let args_mt = {ty: str_ty, mutbl: ast::m_imm};
- let args_ty_inner = @{id: cx.sess.next_node_id(),
- node: ast::ty_vec(args_mt),
- span: dummy_sp()};
- let args_ty = {id: cx.sess.next_node_id(),
- node: ast::ty_uniq({ty: args_ty_inner, mutbl: ast::m_imm}),
- span: dummy_sp()};
-
-
- let args_arg: ast::arg =
- {mode: ast::expl(ast::by_val),
- ty: @args_ty,
- ident: cx.sess.ident_of(~"args"),
- id: cx.sess.next_node_id()};
-
let ret_ty = {id: cx.sess.next_node_id(),
node: ast::ty_nil,
span: dummy_sp()};
let decl: ast::fn_decl =
- {inputs: ~[args_arg],
+ {inputs: ~[],
output: @ret_ty,
cf: ast::return_val};
@@ -465,9 +443,11 @@ fn mk_main(cx: test_ctxt) -> @ast::item {
}
fn mk_test_main_call(cx: test_ctxt) -> @ast::expr {
-
- // Get the args passed to main so we can pass the to test_main
- let args_path = path_node(~[cx.sess.ident_of(~"args")]);
+ // Call os::args to generate the vector of test_descs
+ let args_path = path_node(~[
+ cx.sess.ident_of(~"os"),
+ cx.sess.ident_of(~"args")
+ ]);
let args_path_expr_: ast::expr_ = ast::expr_path(args_path);
@@ -475,6 +455,12 @@ fn mk_test_main_call(cx: test_ctxt) -> @ast::expr {
{id: cx.sess.next_node_id(), callee_id: cx.sess.next_node_id(),
node: args_path_expr_, span: dummy_sp()};
+ let args_call_expr_ = ast::expr_call(@args_path_expr, ~[], false);
+
+ let args_call_expr: ast::expr =
+ {id: cx.sess.next_node_id(), callee_id: cx.sess.next_node_id(),
+ node: args_call_expr_, span: dummy_sp()};
+
// Call __test::test to generate the vector of test_descs
let test_path = path_node(~[cx.sess.ident_of(~"tests")]);
@@ -503,7 +489,7 @@ fn mk_test_main_call(cx: test_ctxt) -> @ast::expr {
let test_main_call_expr_: ast::expr_ =
ast::expr_call(@test_main_path_expr,
- ~[@args_path_expr, @test_call_expr], false);
+ ~[@args_call_expr, @test_call_expr], false);
let test_main_call_expr: ast::expr =
{id: cx.sess.next_node_id(), callee_id: cx.sess.next_node_id(),
View
20 src/rustc/middle/trans/base.rs
@@ -1953,32 +1953,23 @@ fn register_fn_fuller(ccx: @crate_ctxt, sp: span, path: path,
ast_map::path_to_str(path, ccx.sess.parse_sess.interner));
let is_main = is_main_name(path) && !ccx.sess.building_library;
- if is_main { create_main_wrapper(ccx, sp, llfn, node_type); }
+ if is_main { create_main_wrapper(ccx, sp, llfn); }
llfn
}
// Create a _rust_main(args: ~[str]) function which will be called from the
// runtime rust_start function
-fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
- main_node_type: ty::t) {
+fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef) {
if ccx.main_fn != None::<ValueRef> {
ccx.sess.span_fatal(sp, ~"multiple 'main' functions");
}
- let main_takes_argv =
- // invariant!
- match ty::get(main_node_type).sty {
- ty::ty_fn(ref fn_ty) => fn_ty.sig.inputs.len() != 0u,
- _ => ccx.sess.span_fatal(sp, ~"main has a non-function type")
- };
-
- let llfn = create_main(ccx, main_llfn, main_takes_argv);
+ let llfn = create_main(ccx, main_llfn);
ccx.main_fn = Some(llfn);
create_entry_fn(ccx, llfn);
- fn create_main(ccx: @crate_ctxt, main_llfn: ValueRef,
- takes_argv: bool) -> ValueRef {
+ fn create_main(ccx: @crate_ctxt, main_llfn: ValueRef) -> ValueRef {
let unit_ty = ty::mk_estr(ccx.tcx, ty::vstore_uniq);
let vecarg_ty: ty::arg =
{mode: ast::expl(ast::by_val),
@@ -1998,9 +1989,6 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
let lloutputarg = llvm::LLVMGetParam(llfdecl, 0 as c_uint);
let llenvarg = llvm::LLVMGetParam(llfdecl, 1 as c_uint);
let mut args = ~[lloutputarg, llenvarg];
- if takes_argv {
- args.push(llvm::LLVMGetParam(llfdecl, 2 as c_uint));
- }
Call(bcx, main_llfn, args);
build_return(bcx);
View
6 src/rustc/middle/typeck.rs
@@ -301,14 +301,12 @@ fn check_main_fn_ty(ccx: @crate_ctxt,
}
let mut ok = ty::type_is_nil(fn_ty.sig.output);
let num_args = vec::len(fn_ty.sig.inputs);
- ok &= num_args == 0u || num_args == 1u &&
- arg_is_argv_ty(tcx, fn_ty.sig.inputs[0]);
+ ok &= num_args == 0u;
if !ok {
tcx.sess.span_err(
main_span,
fmt!("Wrong type in main function: found `%s`, \
- expected `extern fn(++v: ~[~str]) -> ()` \
- or `extern fn() -> ()`",
+ expected `fn() -> ()`",
ty_to_str(tcx, main_t)));
}
}
View
3  src/rustdoc/rustdoc.rs
@@ -3,7 +3,8 @@ use doc::Item;
use pass::Pass;
use config::Config;
-fn main(args: ~[~str]) {
+fn main() {
+ let args = os::args();
if args.contains(&~"-h") || args.contains(&~"--help") {
config::usage();
View
3  src/test/bench/core-map.rs
@@ -142,7 +142,8 @@ fn empty_results() -> Results {
}
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let num_keys = {
if args.len() == 2 {
uint::from_str(args[1]).get()
View
3  src/test/bench/core-std.rs
@@ -8,7 +8,8 @@ use std::map::{Map, HashMap};
use io::{Reader, ReaderUtil};
-fn main(++argv: ~[~str]) {
+fn main() {
+ let argv = os::args();
#macro[
[#bench[id],
maybe_run_test(argv, #stringify(id), id)
View
3  src/test/bench/core-uint-to-str.rs
@@ -1,4 +1,5 @@
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"10000000"]
} else if args.len() <= 1u {
View
3  src/test/bench/core-vec-append.rs
@@ -20,7 +20,8 @@ fn collect_dvec(num: uint) -> ~[uint] {
return dvec::unwrap(move result);
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"50000000"]
} else if args.len() <= 1u {
View
3  src/test/bench/graph500-bfs.rs
@@ -384,7 +384,8 @@ fn validate(edges: ~[(node_id, node_id)],
true
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"15", ~"48"]
} else if args.len() <= 1u {
View
3  src/test/bench/msgsend-pipes-shared.rs
@@ -90,7 +90,8 @@ fn run(args: &[~str]) {
assert result == num_bytes * size;
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"1000000", ~"10000"]
} else if args.len() <= 1u {
View
3  src/test/bench/msgsend-pipes.rs
@@ -87,7 +87,8 @@ fn run(args: &[~str]) {
assert result == num_bytes * size;
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"1000000", ~"8"]
} else if args.len() <= 1u {
View
3  src/test/bench/msgsend-ring-mutex-arcs.rs
@@ -56,7 +56,8 @@ fn thread_ring(i: uint,
};
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"100", ~"10000"]
} else if args.len() <= 1u {
View
3  src/test/bench/msgsend-ring-pipes.rs
@@ -52,7 +52,8 @@ fn thread_ring(i: uint,
};
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"100", ~"10000"]
} else if args.len() <= 1u {
View
3  src/test/bench/msgsend-ring-rw-arcs.rs
@@ -56,7 +56,8 @@ fn thread_ring(i: uint,
};
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"100", ~"10000"]
} else if args.len() <= 1u {
View
3  src/test/bench/msgsend-ring.rs
@@ -21,7 +21,8 @@ fn thread_ring(i: uint,
};
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"100", ~"10000"]
} else if args.len() <= 1u {
View
3  src/test/bench/msgsend.rs
@@ -57,7 +57,8 @@ fn run(args: ~[~str]) {
io::stdout().write_str(fmt!("Throughput=%f per sec\n", thruput));
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"1000000", ~"10000"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-ackermann.rs
@@ -12,7 +12,8 @@ fn ack(m: int, n: int) -> int {
}
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"12"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-binarytrees.rs
@@ -25,7 +25,8 @@ fn bottom_up_tree(arena: &r/arena::Arena,
return arena.alloc(|| nil);
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"17"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-chameneos-redux.rs
@@ -178,7 +178,8 @@ fn rendezvous(nn: uint, set: ~[color]) {
io::println(show_number(creatures_met));
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"200000"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-fannkuchredux.rs
@@ -56,7 +56,8 @@ fn fannkuch(n: int) -> int {
return flips;
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"10"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-fasta.rs
@@ -70,7 +70,8 @@ fn make_repeat_fasta(wr: io::Writer, id: ~str, desc: ~str, s: ~str, n: int) unsa
fn acid(ch: char, prob: u32) -> aminoacids { return {ch: ch, prob: prob}; }
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
// alioth tests k-nucleotide with this data at 25,000,000
~[~"", ~"5000000"]
View
3  src/test/bench/shootout-fibo.rs
@@ -8,7 +8,8 @@ fn fib(n: int) -> int {
}
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"40"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -128,7 +128,8 @@ fn make_sequence_processor(sz: uint, from_parent: pipes::Port<~[u8]>,
}
// given a FASTA file on stdin, process sequence THREE
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let rdr = if os::getenv(~"RUST_BENCH").is_some() {
// FIXME: Using this compile-time env variable is a crummy way to
// get to this massive data set, but #include_bin chokes on it (#2598)
View
3  src/test/bench/shootout-k-nucleotide.rs
@@ -125,7 +125,8 @@ fn make_sequence_processor(sz: uint, from_parent: comm::Port<~[u8]>,
}
// given a FASTA file on stdin, process sequence THREE
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let rdr = if os::getenv(~"RUST_BENCH").is_some() {
// FIXME: Using this compile-time env variable is a crummy way to
// get to this massive data set, but #include_bin chokes on it (#2598)
View
3  src/test/bench/shootout-mandelbrot.rs
@@ -151,7 +151,8 @@ fn writer(path: ~str, writech: comm::Chan<comm::Chan<line>>, size: uint)
}
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"4000", ~"10"]
} else {
View
3  src/test/bench/shootout-nbody.rs
@@ -14,7 +14,8 @@ extern mod libc {
fn sqrt(n: float) -> float;
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"4000000"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-pfib.rs
@@ -81,7 +81,8 @@ fn stress(num_tasks: int) {
for results.each |r| { future::get(r); }
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"20"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-spectralnorm.rs
@@ -40,7 +40,8 @@ fn eval_AtA_times_u(u: ~[const float], AtAu: ~[mut float]) {
eval_At_times_u(v, AtAu);
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"2000"]
} else if args.len() <= 1u {
View
3  src/test/bench/shootout-threadring.rs
@@ -37,7 +37,8 @@ fn roundtrip(id: int, p: comm::Port<int>, ch: comm::Chan<int>) {
}
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"2000000"]
} else if args.len() <= 1u {
View
3  src/test/bench/std-smallintmap.rs
@@ -17,7 +17,8 @@ fn check_sequential(min: uint, max: uint, map: SmallIntMap<uint>) {
}
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"100000", ~"100"]
} else if args.len() <= 1u {
View
3  src/test/bench/sudoku.rs
@@ -126,7 +126,8 @@ fn write_grid(f: io::Writer, g: grid_t) {
}
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let grid = if vec::len(args) == 1u {
// FIXME create sudoku inline since nested vec consts dont work yet
// (#571)
View
3  src/test/bench/task-perf-jargon-metal-smoke.rs
@@ -23,7 +23,8 @@ fn child_generation(gens_left: uint, -c: pipes::Chan<()>) {
}
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"100000"]
} else if args.len() <= 1u {
View
3  src/test/bench/task-perf-linked-failure.rs
@@ -37,7 +37,8 @@ fn spawn_supervised_blocking(myname: &str, +f: fn~()) {
assert x == task::Success;
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"100000"]
} else if args.len() <= 1u {
View
3  src/test/bench/task-perf-one-million.rs
@@ -48,7 +48,8 @@ fn calc(children: uint, parent_ch: comm::Chan<msg>) {
comm::send(parent_ch, done(sum + 1));
}
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"100000"]
} else if args.len() <= 1u {
View
3  src/test/bench/task-perf-spawnalot.rs
@@ -8,7 +8,8 @@ fn f(&&n: uint) {
fn g() { }
-fn main(++args: ~[~str]) {
+fn main() {
+ let args = os::args();
let args = if os::getenv(~"RUST_BENCH").is_some() {
~[~"", ~"400"]
} else if args.len() <= 1u {
View
3  src/test/bench/task-perf-word-count-generic.rs
@@ -288,7 +288,8 @@ mod map_reduce {
}
}
-fn main(++argv: ~[~str]) {
+fn main() {
+ let argv = os::args();
if vec::len(argv) < 2u && !os::getenv(~"RUST_BENCH").is_some() {
let out = io::stdout();
View
2  src/test/compile-fail/bad-main.rs
@@ -1,3 +1,3 @@
-// error-pattern:expected `extern fn(++v: ~[~str])
+// error-pattern:expected `fn()
fn main(x: int) { }
View
5 src/test/run-pass/argv.rs
@@ -1,5 +0,0 @@
-fn main(++args: ~[~str]) {
- let vs: ~[~str] = ~[~"hi", ~"there", ~"this", ~"is", ~"a", ~"vec"];
- let vvs: ~[~[~str]] = ~[args, vs];
- for vvs.each |vs| { for vs.each |s| { log(debug, *s); } }
-}
View
3  src/test/run-pass/command-line-args.rs
@@ -1,3 +0,0 @@
-
-
-fn main(++args: ~[~str]) { log(debug, args[0]); }
View
1  src/test/run-pass/main-ivec.rs
@@ -1 +0,0 @@
-fn main(++args: ~[~str]) { for args.each |s| { log(debug, *s); } }
Please sign in to comment.
Something went wrong with that request. Please try again.