Skip to content

Commit 49f14d3

Browse files
committed
rollup merge of rust-lang#20350: fhahn/issue-20340-rustdoc-version
Patch for rust-lang#20340. `rustdoc --version` panics because it uses `rustc_driver::version`, which in turn checks the `verbose` flag, which was not defined for rustdoc. In this patch I have added a verbose flag to rustdoc, because I think it should be useful for other things besides --version. Another possible fix would be to check if a verbose option was defined in `rustc_driver` or add an extra `version` function for rustdoc.
2 parents 38f9805 + c11e155 commit 49f14d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ pub fn opts() -> Vec<getopts::OptGroup> {
116116
use getopts::*;
117117
vec!(
118118
optflag("h", "help", "show this help message"),
119-
optflagopt("", "version", "print rustdoc's version", "verbose"),
119+
optflag("V", "version", "print rustdoc's version"),
120+
optflag("v", "verbose", "use verbose output"),
120121
optopt("r", "input-format", "the input type of the specified file",
121122
"[rust|json]"),
122123
optopt("w", "output-format", "the output type to write",

0 commit comments

Comments
 (0)