summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJyun-Yan You <jyyou.tw@gmail.com>2014-10-30 15:23:31 +0800
committerJyun-Yan You <jyyou.tw@gmail.com>2014-10-30 15:23:31 +0800
commit3b131b8add7a72a0b3dca72f79919a2a5761757d (patch)
tree81a3275d836a516d918758f0a0783d1851311538
parentb6c4f63d9678585722f62009231d602547a2c0fe (diff)
Rename `fail!` to `panic!`
-rw-r--r--src/bin/bindgen.rs2
-rw-r--r--src/types.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/bindgen.rs b/src/bin/bindgen.rs
index f618cc02..2189c553 100644
--- a/src/bin/bindgen.rs
+++ b/src/bin/bindgen.rs
@@ -188,7 +188,7 @@ pub fn main() {
let bin = bind_args.remove(0).unwrap();
match parse_args(bind_args.as_slice()) {
- ParseErr(e) => fail!(e),
+ ParseErr(e) => panic!(e),
CmdUsage => print_usage(bin),
ParseOk(options, out) => {
let logger = StdLogger;
diff --git a/src/types.rs b/src/types.rs
index 2ea72ce9..c1a98891 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -19,7 +19,7 @@ impl Global {
match *self {
GComp(ref i) => return i.clone(),
GCompDecl(ref i) => return i.clone(),
- _ => fail!("global_compinfo".to_string())
+ _ => panic!("global_compinfo".to_string())
}
}
@@ -27,14 +27,14 @@ impl Global {
match *self {
GEnum(ref i) => return i.clone(),
GEnumDecl(ref i) => return i.clone(),
- _ => fail!("global_enuminfo".to_string())
+ _ => panic!("global_enuminfo".to_string())
}
}
pub fn typeinfo(&self) -> Rc<RefCell<TypeInfo>> {
match *self {
GType(ref i) => return i.clone(),
- _ => fail!("global_typeinfo".to_string())
+ _ => panic!("global_typeinfo".to_string())
}
}
@@ -42,7 +42,7 @@ impl Global {
match *self {
GVar(ref i) => i.clone(),
GFunc(ref i) => i.clone(),
- _ => fail!("global_varinfo".to_string())
+ _ => panic!("global_varinfo".to_string())
}
}
}