Skip to content

Commit bf2ab22

Browse files
committed
auto merge of #11574 : neeee/rust/master, r=alexcrichton
Reverted according to #11458 (comment). Fixes #11458.
2 parents a5ed0c5 + 3b32ea8 commit bf2ab22

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/librustc/driver/driver.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ pub fn optgroups() -> ~[getopts::groups::OptGroup] {
10111011
for details)", "FEATURE"),
10121012
optopt("", "android-cross-path",
10131013
"The path to the Android NDK", "PATH"),
1014-
optflagopt("W", "warn",
1014+
optmulti("W", "warn",
10151015
"Set lint warnings", "OPT"),
10161016
optmulti("A", "allow",
10171017
"Set lint allowed", "OPT"),

src/librustc/lib.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,9 @@ pub fn run_compiler(args: &[~str], demitter: @diagnostic::Emitter) {
227227
return;
228228
}
229229

230-
// Display the available lint options if "-W help" or only "-W" is given.
231230
let lint_flags = vec::append(matches.opt_strs("W"),
232231
matches.opt_strs("warn"));
233-
234-
let show_lint_options = lint_flags.iter().any(|x| x == &~"help") ||
235-
(matches.opt_present("W") && lint_flags.is_empty());
236-
237-
if show_lint_options {
232+
if lint_flags.iter().any(|x| x == &~"help") {
238233
describe_warnings();
239234
return;
240235
}

0 commit comments

Comments
 (0)