diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-07-31 16:38:41 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-07-31 17:22:30 -0700 |
| commit | 7b2026bf218c416c653faf8bb8cca770d0bb2c0d (patch) | |
| tree | 9c09c3d7d1b1dcc2d12d11061bf5755727d83128 /src/compiletest/compiletest.rs | |
| parent | 7d18369804f23cd04d10f33e420fbcdc8ea76ecf (diff) | |
| download | rust-7b2026bf218c416c653faf8bb8cca770d0bb2c0d.tar.gz rust-7b2026bf218c416c653faf8bb8cca770d0bb2c0d.zip | |
Introduce 'return', 'match' and 'module' as synonyms
Diffstat (limited to 'src/compiletest/compiletest.rs')
| -rw-r--r-- | src/compiletest/compiletest.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 066b9c78ee9..42d69566152 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -41,29 +41,29 @@ fn parse_config(args: ~[~str]) -> config { assert (vec::is_not_empty(args)); let args_ = vec::tail(args); - let match = + let matches = alt getopts::getopts(args_, opts) { ok(m) { m } err(f) { fail getopts::fail_str(f) } }; - ret {compile_lib_path: getopts::opt_str(match, ~"compile-lib-path"), - run_lib_path: getopts::opt_str(match, ~"run-lib-path"), - rustc_path: getopts::opt_str(match, ~"rustc-path"), - src_base: getopts::opt_str(match, ~"src-base"), - build_base: getopts::opt_str(match, ~"build-base"), - aux_base: getopts::opt_str(match, ~"aux-base"), - stage_id: getopts::opt_str(match, ~"stage-id"), - mode: str_mode(getopts::opt_str(match, ~"mode")), - run_ignored: getopts::opt_present(match, ~"ignored"), + ret {compile_lib_path: getopts::opt_str(matches, ~"compile-lib-path"), + run_lib_path: getopts::opt_str(matches, ~"run-lib-path"), + rustc_path: getopts::opt_str(matches, ~"rustc-path"), + src_base: getopts::opt_str(matches, ~"src-base"), + build_base: getopts::opt_str(matches, ~"build-base"), + aux_base: getopts::opt_str(matches, ~"aux-base"), + stage_id: getopts::opt_str(matches, ~"stage-id"), + mode: str_mode(getopts::opt_str(matches, ~"mode")), + run_ignored: getopts::opt_present(matches, ~"ignored"), filter: - if vec::len(match.free) > 0u { - option::some(match.free[0]) + if vec::len(matches.free) > 0u { + option::some(matches.free[0]) } else { option::none }, - logfile: getopts::opt_maybe_str(match, ~"logfile"), - runtool: getopts::opt_maybe_str(match, ~"runtool"), - rustcflags: getopts::opt_maybe_str(match, ~"rustcflags"), - verbose: getopts::opt_present(match, ~"verbose")}; + logfile: getopts::opt_maybe_str(matches, ~"logfile"), + runtool: getopts::opt_maybe_str(matches, ~"runtool"), + rustcflags: getopts::opt_maybe_str(matches, ~"rustcflags"), + verbose: getopts::opt_present(matches, ~"verbose")}; } fn log_config(config: config) { |
