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:
commit
508ffa3352
1 changed files with 6 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue