Skip to content

Commit 5cfd5ed

Browse files
authored
Rollup merge of rust-lang#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 rust-lang#39310
2 parents 76e9ea7 + bb34856 commit 5cfd5ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub fn main_args(args: &[String]) -> isize {
193193
nightly_options::check_nightly_options(&matches, &opts());
194194

195195
if matches.opt_present("h") || matches.opt_present("help") {
196-
usage(&args[0]);
196+
usage("rustdoc");
197197
return 0;
198198
} else if matches.opt_present("version") {
199199
rustc_driver::version("rustdoc", &matches);

0 commit comments

Comments
 (0)