Flatten conditionals in rustc.rs. Remove FIXME
This commit is contained in:
parent
bed457d3a7
commit
b893bec4bb
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user