about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-02-14 15:37:48 -0800
committerbors <bors@rust-lang.org>2013-02-14 15:37:48 -0800
commit3c07d037cd38204bda1ff9c564b6c1941c25138f (patch)
treeed3c158690080b922ec4d34836b7e15b76f118c7 /src
parent03743ee449afb423d4a84f16976589bfd49acbf6 (diff)
parent4699ac67c6b48331852f3960430a3c8cfcaf7b90 (diff)
downloadrust-3c07d037cd38204bda1ff9c564b6c1941c25138f.tar.gz
rust-3c07d037cd38204bda1ff9c564b6c1941c25138f.zip
auto merge of #4934 : nickdesaulniers/rust/issue4524cleanup, r=brson
review? @brson
Issue #4524
Diffstat (limited to 'src')
-rw-r--r--src/libcore/hashmap.rs6
-rw-r--r--src/libcore/os.rs4
-rw-r--r--src/libstd/json.rs4
-rw-r--r--src/libstd/test.rs2
-rw-r--r--src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs2
-rw-r--r--src/test/compile-fail/borrowck-borrow-from-stack-variable.rs2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/hashmap.rs b/src/libcore/hashmap.rs
index 1e9f05a35eb..9ec91d38515 100644
--- a/src/libcore/hashmap.rs
+++ b/src/libcore/hashmap.rs
@@ -159,7 +159,7 @@ pub mod linear {
         pure fn value_for_bucket(&self, idx: uint) -> &self/V {
             match self.buckets[idx] {
                 Some(ref bkt) => &bkt.value,
-                None => die!(~"LinearMap::find: internal logic error"),
+                None => fail!(~"LinearMap::find: internal logic error"),
             }
         }
 
@@ -373,7 +373,7 @@ pub mod linear {
 
             let hash = k.hash_keyed(self.k0, self.k1) as uint;
             let idx = match self.bucket_for_key_with_hash(hash, &k) {
-                TableFull => die!(~"Internal logic error"),
+                TableFull => fail!(~"Internal logic error"),
                 FoundEntry(idx) => idx,
                 FoundHole(idx) => {
                     self.buckets[idx] = Some(Bucket{hash: hash, key: k,
@@ -403,7 +403,7 @@ pub mod linear {
 
             let hash = k.hash_keyed(self.k0, self.k1) as uint;
             let idx = match self.bucket_for_key_with_hash(hash, &k) {
-                TableFull => die!(~"Internal logic error"),
+                TableFull => fail!(~"Internal logic error"),
                 FoundEntry(idx) => idx,
                 FoundHole(idx) => {
                     let v = f(&k);
diff --git a/src/libcore/os.rs b/src/libcore/os.rs
index 6ed8d70642c..8a6a241d870 100644
--- a/src/libcore/os.rs
+++ b/src/libcore/os.rs
@@ -849,7 +849,7 @@ pub fn last_os_error() -> ~str {
             let err = strerror_r(errno() as c_int, &buf[0],
                                  TMPBUF_SZ as size_t);
             if err < 0 {
-                die!(~"strerror_r failure");
+                fail!(~"strerror_r failure");
             }
 
             str::raw::from_c_str(&buf[0])
@@ -887,7 +887,7 @@ pub fn last_os_error() -> ~str {
                                      &mut buf[0], TMPBUF_SZ as DWORD,
                                      ptr::null());
             if res == 0 {
-                die!(fmt!("[%?] FormatMessage failure", errno()));
+                fail!(fmt!("[%?] FormatMessage failure", errno()));
             }
 
             str::raw::from_c_str(&buf[0])
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index fcdd2de5743..088afe4778e 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -1284,13 +1284,13 @@ mod tests {
     // Should they be in their own crate?
     pub pure fn check_equal_ptr<T : cmp::Eq> (given : &T, expected: &T) {
         if !((given == expected) && (expected == given )) {
-            die!(fmt!("given %?, expected %?",given,expected));
+            fail!(fmt!("given %?, expected %?",given,expected));
         }
     }
 
     pub pure fn check_equal<T : cmp::Eq> (given : T, expected: T) {
         if !((given == expected) && (expected == given )) {
-            die!(fmt!("given %?, expected %?",given,expected));
+            fail!(fmt!("given %?, expected %?",given,expected));
         }
     }
 
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index 530761e48a2..2eae377b91a 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -143,7 +143,7 @@ pub fn test_main_static(args: &[~str], tests: &[TestDescAndFn]) {
             TestDescAndFn { testfn: StaticBenchFn(f), desc: copy t.desc },
 
             _ => {
-                die! (~"non-static tests passed to test::test_main_static");
+                fail!(~"non-static tests passed to test::test_main_static");
             }
         }
     };
diff --git a/src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs b/src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs
index 47b6b4de642..005908f86d8 100644
--- a/src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs
+++ b/src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs
@@ -18,7 +18,7 @@ struct Bar {
   int2: int,
 }
 
-fn make_foo() -> ~Foo { die!() }
+fn make_foo() -> ~Foo { fail!() }
 
 fn borrow_same_field_twice_mut_mut() {
     let mut foo = make_foo();
diff --git a/src/test/compile-fail/borrowck-borrow-from-stack-variable.rs b/src/test/compile-fail/borrowck-borrow-from-stack-variable.rs
index 30757cc6e77..035e293bc36 100644
--- a/src/test/compile-fail/borrowck-borrow-from-stack-variable.rs
+++ b/src/test/compile-fail/borrowck-borrow-from-stack-variable.rs
@@ -18,7 +18,7 @@ struct Bar {
   int2: int,
 }
 
-fn make_foo() -> Foo { die!() }
+fn make_foo() -> Foo { fail!() }
 
 fn borrow_same_field_twice_mut_mut() {
     let mut foo = make_foo();