提交 79e144ed 编写于 作者: A Alex Crichton

rustdoc: Get --version working

Closes #11421
上级 b1eaeb55
......@@ -83,6 +83,7 @@ pub fn opts() -> ~[groups::OptGroup] {
use extra::getopts::groups::*;
~[
optflag("h", "help", "show this help message"),
optflag("", "version", "print rustdoc's version"),
optopt("r", "input-format", "the input type of the specified file",
"[rust|json]"),
optopt("w", "output-format", "the output type to write",
......@@ -119,6 +120,9 @@ pub fn main_args(args: &[~str]) -> int {
if matches.opt_present("h") || matches.opt_present("help") {
usage(args[0]);
return 0;
} else if matches.opt_present("version") {
rustc::version(args[0]);
return 0;
}
if matches.free.len() == 0 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册