Rollup merge of #48993 - alexheretic:fix-48816, r=michaelwoerister

fix #48816 don't print help on indirect compiler ICE

https://github.com/rust-lang/rust/issues/48816#issuecomment-372817573
This commit is contained in:
kennytm 2018-03-14 23:29:57 +08:00
commit 508ffa3352
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C

View file

@ -1484,6 +1484,12 @@ fn extra_compiler_flags() -> Option<(Vec<String>, bool)> {
args.push(arg.to_string_lossy().to_string());
}
// Avoid printing help because of empty args. This can suggest the compiler
// itself is not the program root (consider RLS).
if args.len() < 2 {
return None;
}
let matches = if let Some(matches) = handle_options(&args) {
matches
} else {