about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-10 08:26:24 -0800
committerbors <bors@rust-lang.org>2014-01-10 08:26:24 -0800
commitff7ecca20e116b8365d8095fa9618dc11e54cfbe (patch)
tree90af33ad2bf734013c13c6215c48aafd795a812f
parent7fe8692d3347c4eabfad2fbbd8a336069102c63f (diff)
parent6f875c96b3a27e7acb61e421ad667de76e4f0c57 (diff)
downloadrust-ff7ecca20e116b8365d8095fa9618dc11e54cfbe.tar.gz
rust-ff7ecca20e116b8365d8095fa9618dc11e54cfbe.zip
auto merge of #11452 : derekchiang/rust/fix-11421, r=cmr
Closes #11421.  A pretty trivial fix.
-rw-r--r--src/librustdoc/lib.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 28c4d721c84..cfebde6b311 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -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.
 //
@@ -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;