Skip to content

Commit 81135fb

Browse files
brsongraydon
authored andcommitted
---
yaml --- r: 1522 b: refs/heads/master c: b893bec h: refs/heads/master v: v3
1 parent 3b95171 commit 81135fb

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: bed457d3a7244b317c54962d80b460294b846c27
2+
refs/heads/master: b893bec4bbdfda549a1c45bd5328b3dd78a2e05c

trunk/src/comp/driver/rustc.rs

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,19 @@ impure fn main(vec[str] args) {
113113
do_warn = false;
114114
} else if (_str.eq(arg, "-shared")) {
115115
shared = true;
116-
} else {
117-
// FIXME: rust could use an elif construct.
118-
if (_str.eq(arg, "-o")) {
119-
if (i+1u < len) {
120-
output_file = some(args.(i+1u));
121-
i += 1u;
122-
} else {
123-
usage(sess, args.(0));
124-
sess.err("-o requires an argument");
125-
}
116+
} else if (_str.eq(arg, "-o")) {
117+
if (i+1u < len) {
118+
output_file = some(args.(i+1u));
119+
i += 1u;
126120
} else {
127-
if (_str.eq(arg, "-h")) {
128-
usage(sess, args.(0));
129-
} else {
130-
usage(sess, args.(0));
131-
sess.err("unrecognized option: " + arg);
132-
}
121+
usage(sess, args.(0));
122+
sess.err("-o requires an argument");
133123
}
124+
} else if (_str.eq(arg, "-h")) {
125+
usage(sess, args.(0));
126+
} else {
127+
usage(sess, args.(0));
128+
sess.err("unrecognized option: " + arg);
134129
}
135130
} else {
136131
alt (input_file) {

0 commit comments

Comments
 (0)