diff options
| author | Stefan Plantikow <stefan.plantikow@googlemail.com> | 2011-12-16 01:11:29 +0100 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-12-18 18:55:39 -0800 |
| commit | fa27724a4bb213f896d4003ed129bf7caff7f3a0 (patch) | |
| tree | 019c5300f4244fee7998b7baf165a665eaa9cb52 /src/comp/driver | |
| parent | bd6b80c9720bb4b0143378a052b568697ce3abe6 (diff) | |
| download | rust-fa27724a4bb213f896d4003ed129bf7caff7f3a0.tar.gz rust-fa27724a4bb213f896d4003ed129bf7caff7f3a0.zip | |
std: getopts now uses result::t (fixes #1289)
Diffstat (limited to 'src/comp/driver')
| -rw-r--r-- | src/comp/driver/rustc.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs index a947b14480a..5bb7e60a684 100644 --- a/src/comp/driver/rustc.rs +++ b/src/comp/driver/rustc.rs @@ -11,6 +11,7 @@ import syntax::print::{pp, pprust}; import util::{ppaux, filesearch}; import back::link; import core::{option, str, vec, int, result}; +import result::{ok, err}; import std::{fs, io, getopts}; import option::{some, none}; import getopts::{optopt, optmulti, optflag, optflagopt, opt_present}; @@ -621,8 +622,8 @@ fn main(args: [str]) { let args = args, binary = vec::shift(args); let match = alt getopts::getopts(args, opts()) { - getopts::success(m) { m } - getopts::failure(f) { + ok(m) { m } + err(f) { early_error(getopts::fail_str(f)) } }; @@ -670,7 +671,7 @@ mod test { fn test_switch_implies_cfg_test() { let match = alt getopts::getopts(["--test"], opts()) { - getopts::success(m) { m } + ok(m) { m } }; let sessopts = build_session_options(match); let sess = build_session(sessopts); @@ -684,7 +685,7 @@ mod test { fn test_switch_implies_cfg_test_unless_cfg_test() { let match = alt getopts::getopts(["--test", "--cfg=test"], opts()) { - getopts::success(m) { m } + ok(m) { m } }; let sessopts = build_session_options(match); let sess = build_session(sessopts); |
