Skip to content

Commit 3c07d03

Browse files
committed
auto merge of #4934 : nickdesaulniers/rust/issue4524cleanup, r=brson
review? @brson Issue #4524
2 parents 03743ee + 4699ac6 commit 3c07d03

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/libcore/hashmap.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub mod linear {
159159
pure fn value_for_bucket(&self, idx: uint) -> &self/V {
160160
match self.buckets[idx] {
161161
Some(ref bkt) => &bkt.value,
162-
None => die!(~"LinearMap::find: internal logic error"),
162+
None => fail!(~"LinearMap::find: internal logic error"),
163163
}
164164
}
165165
@@ -373,7 +373,7 @@ pub mod linear {
373373
374374
let hash = k.hash_keyed(self.k0, self.k1) as uint;
375375
let idx = match self.bucket_for_key_with_hash(hash, &k) {
376-
TableFull => die!(~"Internal logic error"),
376+
TableFull => fail!(~"Internal logic error"),
377377
FoundEntry(idx) => idx,
378378
FoundHole(idx) => {
379379
self.buckets[idx] = Some(Bucket{hash: hash, key: k,
@@ -403,7 +403,7 @@ pub mod linear {
403403
404404
let hash = k.hash_keyed(self.k0, self.k1) as uint;
405405
let idx = match self.bucket_for_key_with_hash(hash, &k) {
406-
TableFull => die!(~"Internal logic error"),
406+
TableFull => fail!(~"Internal logic error"),
407407
FoundEntry(idx) => idx,
408408
FoundHole(idx) => {
409409
let v = f(&k);

src/libcore/os.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ pub fn last_os_error() -> ~str {
849849
let err = strerror_r(errno() as c_int, &buf[0],
850850
TMPBUF_SZ as size_t);
851851
if err < 0 {
852-
die!(~"strerror_r failure");
852+
fail!(~"strerror_r failure");
853853
}
854854
855855
str::raw::from_c_str(&buf[0])
@@ -887,7 +887,7 @@ pub fn last_os_error() -> ~str {
887887
&mut buf[0], TMPBUF_SZ as DWORD,
888888
ptr::null());
889889
if res == 0 {
890-
die!(fmt!("[%?] FormatMessage failure", errno()));
890+
fail!(fmt!("[%?] FormatMessage failure", errno()));
891891
}
892892
893893
str::raw::from_c_str(&buf[0])

src/libstd/json.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1284,13 +1284,13 @@ mod tests {
12841284
// Should they be in their own crate?
12851285
pub pure fn check_equal_ptr<T : cmp::Eq> (given : &T, expected: &T) {
12861286
if !((given == expected) && (expected == given )) {
1287-
die!(fmt!("given %?, expected %?",given,expected));
1287+
fail!(fmt!("given %?, expected %?",given,expected));
12881288
}
12891289
}
12901290

12911291
pub pure fn check_equal<T : cmp::Eq> (given : T, expected: T) {
12921292
if !((given == expected) && (expected == given )) {
1293-
die!(fmt!("given %?, expected %?",given,expected));
1293+
fail!(fmt!("given %?, expected %?",given,expected));
12941294
}
12951295
}
12961296

src/libstd/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub fn test_main_static(args: &[~str], tests: &[TestDescAndFn]) {
143143
TestDescAndFn { testfn: StaticBenchFn(f), desc: copy t.desc },
144144
145145
_ => {
146-
die! (~"non-static tests passed to test::test_main_static");
146+
fail!(~"non-static tests passed to test::test_main_static");
147147
}
148148
}
149149
};

src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct Bar {
1818
int2: int,
1919
}
2020

21-
fn make_foo() -> ~Foo { die!() }
21+
fn make_foo() -> ~Foo { fail!() }
2222

2323
fn borrow_same_field_twice_mut_mut() {
2424
let mut foo = make_foo();

src/test/compile-fail/borrowck-borrow-from-stack-variable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct Bar {
1818
int2: int,
1919
}
2020

21-
fn make_foo() -> Foo { die!() }
21+
fn make_foo() -> Foo { fail!() }
2222

2323
fn borrow_same_field_twice_mut_mut() {
2424
let mut foo = make_foo();

0 commit comments

Comments
 (0)