Skip to content

Commit

Permalink
Rollup merge of rust-lang#48993 - alexheretic:fix-48816, r=michaelwoe…
Browse files Browse the repository at this point in the history
…rister

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

rust-lang#48816 (comment)
  • Loading branch information
kennytm committed Mar 14, 2018
2 parents 6639b60 + 63f654a commit 508ffa3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 508ffa3

Please sign in to comment.