Skip to content

Commit

Permalink
fix rust-lang#48816 don't print help on indirect compiler ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed Mar 13, 2018
1 parent 8c4ff22 commit 63f654a
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 @@ -1457,6 +1457,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 63f654a

Please sign in to comment.