about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-02-05 09:14:44 -0500
committerGitHub <noreply@github.com>2017-02-05 09:14:44 -0500
commit5cfd5eda97d69e04cd4f92d500dbcbbc114178f4 (patch)
tree8cee7395586a6b757a3ffb67caffa933bd8983dc /src
parent76e9ea73822a859815ed78c31403e15354f3c4c3 (diff)
parentbb34856e9d0e480758bdc3afaad60654435d12b3 (diff)
downloadrust-5cfd5eda97d69e04cd4f92d500dbcbbc114178f4.tar.gz
rust-5cfd5eda97d69e04cd4f92d500dbcbbc114178f4.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 503ef4c3183..84f69cd3504 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);