Skip to content

Commit 79e144e

Browse files
committed
rustdoc: Get --version working
Closes #11421
1 parent b1eaeb5 commit 79e144e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustdoc/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ pub fn opts() -> ~[groups::OptGroup] {
8383
use extra::getopts::groups::*;
8484
~[
8585
optflag("h", "help", "show this help message"),
86+
optflag("", "version", "print rustdoc's version"),
8687
optopt("r", "input-format", "the input type of the specified file",
8788
"[rust|json]"),
8889
optopt("w", "output-format", "the output type to write",
@@ -119,6 +120,9 @@ pub fn main_args(args: &[~str]) -> int {
119120
if matches.opt_present("h") || matches.opt_present("help") {
120121
usage(args[0]);
121122
return 0;
123+
} else if matches.opt_present("version") {
124+
rustc::version(args[0]);
125+
return 0;
122126
}
123127

124128
if matches.free.len() == 0 {

0 commit comments

Comments
 (0)