Skip to content

Commit

Permalink
auto merge of #11452 : derekchiang/rust/fix-11421, r=cmr
Browse files Browse the repository at this point in the history
Closes #11421.  A pretty trivial fix.
  • Loading branch information
bors committed Jan 10, 2014
2 parents 7fe8692 + 6f875c9 commit ff7ecca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -109,7 +109,13 @@ pub fn usage(argv0: &str) {
}

pub fn main_args(args: &[~str]) -> int {
let matches = groups::getopts(args.tail(), opts()).unwrap();
let matches = match groups::getopts(args.tail(), opts()) {
Ok(m) => m,
Err(err) => {
println(err.to_err_msg());
return 1;
}
};
if matches.opt_present("h") || matches.opt_present("help") {
usage(args[0]);
return 0;
Expand Down

0 comments on commit ff7ecca

Please sign in to comment.