Flatten conditionals in rustc.rs. Remove FIXME

This commit is contained in:
Brian Anderson
2011-03-06 13:00:52 -05:00
committed by Graydon Hoare
parent bed457d3a7
commit b893bec4bb

View File

@@ -113,9 +113,7 @@ impure fn main(vec[str] args) {
do_warn = false; do_warn = false;
} else if (_str.eq(arg, "-shared")) { } else if (_str.eq(arg, "-shared")) {
shared = true; shared = true;
} else { } else if (_str.eq(arg, "-o")) {
// FIXME: rust could use an elif construct.
if (_str.eq(arg, "-o")) {
if (i+1u < len) { if (i+1u < len) {
output_file = some(args.(i+1u)); output_file = some(args.(i+1u));
i += 1u; i += 1u;
@@ -123,15 +121,12 @@ impure fn main(vec[str] args) {
usage(sess, args.(0)); usage(sess, args.(0));
sess.err("-o requires an argument"); sess.err("-o requires an argument");
} }
} else { } else if (_str.eq(arg, "-h")) {
if (_str.eq(arg, "-h")) {
usage(sess, args.(0)); usage(sess, args.(0));
} else { } else {
usage(sess, args.(0)); usage(sess, args.(0));
sess.err("unrecognized option: " + arg); sess.err("unrecognized option: " + arg);
} }
}
}
} else { } else {
alt (input_file) { alt (input_file) {
case (some[str](_)) { case (some[str](_)) {