mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
parent
b1eaeb5561
commit
79e144ed64
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user