From bb34856e9d0e480758bdc3afaad60654435d12b3 Mon Sep 17 00:00:00 2001 From: Michael Gattozzi Date: Thu, 26 Jan 2017 01:35:00 -0500 Subject: [PATCH] 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 --- src/librustdoc/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 503ef4c3183d2..84f69cd35045c 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -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);