Skip to content

Commit bb34856

Browse files
committed
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
1 parent 6991938 commit bb34856

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/lib.rs

+1-1
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)