Rollup merge of #39312 - mgattozzi:rustdoc-help-fix, r=alexcrichton

Fix full path being output with `rustdoc -h`

rustdoc would output the full path to the binary when calling it with
the `-h` or `--help` flags. This is undesired behavior. It has been
replaced with a hardcoded string `rustdoc` to fix the issue.

Fixes #39310
This commit is contained in:
Corey Farwell 2017-02-05 09:14:44 -05:00 committed by GitHub
commit 5cfd5eda97

View file

@ -193,7 +193,7 @@ pub fn main_args(args: &[String]) -> isize {
nightly_options::check_nightly_options(&matches, &opts());
if matches.opt_present("h") || matches.opt_present("help") {
usage(&args[0]);
usage("rustdoc");
return 0;
} else if matches.opt_present("version") {
rustc_driver::version("rustdoc", &matches);