We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1eaeb5 commit 79e144eCopy full SHA for 79e144e
src/librustdoc/lib.rs
@@ -83,6 +83,7 @@ pub fn opts() -> ~[groups::OptGroup] {
83
use extra::getopts::groups::*;
84
~[
85
optflag("h", "help", "show this help message"),
86
+ optflag("", "version", "print rustdoc's version"),
87
optopt("r", "input-format", "the input type of the specified file",
88
"[rust|json]"),
89
optopt("w", "output-format", "the output type to write",
@@ -119,6 +120,9 @@ pub fn main_args(args: &[~str]) -> int {
119
120
if matches.opt_present("h") || matches.opt_present("help") {
121
usage(args[0]);
122
return 0;
123
+ } else if matches.opt_present("version") {
124
+ rustc::version(args[0]);
125
+ return 0;
126
}
127
128
if matches.free.len() == 0 {
0 commit comments