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,24 +113,19 @@ fn get_os() -> session.os {
do_warn = false;
} else if (_str.eq(arg, "-shared")) {
shared = true;
} else {
// FIXME: rust could use an elif construct.
if (_str.eq(arg, "-o")) {
if (i+1u < len) {
output_file = some(args.(i+1u));
i += 1u;
} else {
usage(sess, args.(0));
sess.err("-o requires an argument");
}
} else if (_str.eq(arg, "-o")) {
if (i+1u < len) {
output_file = some(args.(i+1u));
i += 1u;
} else {
if (_str.eq(arg, "-h")) {
usage(sess, args.(0));
} else {
usage(sess, args.(0));
sess.err("unrecognized option: " + arg);
}
usage(sess, args.(0));
sess.err("-o requires an argument");
}
} else if (_str.eq(arg, "-h")) {
usage(sess, args.(0));
} else {
usage(sess, args.(0));
sess.err("unrecognized option: " + arg);
}
} else {
alt (input_file) {