diff options
Diffstat (limited to 'src/libextra/sync.rs')
| -rw-r--r-- | src/libextra/sync.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libextra/sync.rs b/src/libextra/sync.rs index b5b182ea8c5..5a2c1e0998c 100644 --- a/src/libextra/sync.rs +++ b/src/libextra/sync.rs @@ -309,9 +309,9 @@ fn check_cvar_bounds<U>(out_of_bounds: Option<uint>, id: uint, act: &str, blk: &fn() -> U) -> U { match out_of_bounds { Some(0) => - fail2!("{} with illegal ID {} - this lock has no condvars!", act, id), + fail!("{} with illegal ID {} - this lock has no condvars!", act, id), Some(length) => - fail2!("{} with illegal ID {} - ID must be less than {}", act, id, length), + fail!("{} with illegal ID {} - ID must be less than {}", act, id, length), None => blk() } } @@ -636,7 +636,7 @@ impl RWLock { pub fn downgrade<'a>(&self, token: RWLockWriteMode<'a>) -> RWLockReadMode<'a> { if !borrow::ref_eq(self, token.lock) { - fail2!("Can't downgrade() with a different rwlock's write_mode!"); + fail!("Can't downgrade() with a different rwlock's write_mode!"); } unsafe { do task::unkillable { @@ -920,7 +920,7 @@ mod tests { let result: result::Result<(),()> = do task::try { do m2.lock { - fail2!(); + fail!(); } }; assert!(result.is_err()); @@ -940,7 +940,7 @@ mod tests { do task::spawn || { // linked let _ = p.recv(); // wait for sibling to get in the mutex task::deschedule(); - fail2!(); + fail!(); } do m2.lock_cond |cond| { c.send(()); // tell sibling go ahead @@ -978,9 +978,9 @@ mod tests { do (|| { cond.wait(); // block forever }).finally { - error2!("task unwinding and sending"); + error!("task unwinding and sending"); c.send(()); - error2!("task unwinding and done sending"); + error!("task unwinding and done sending"); } } } @@ -990,7 +990,7 @@ mod tests { } do m2.lock { } c.send(sibling_convos); // let parent wait on all children - fail2!(); + fail!(); }; assert!(result.is_err()); // child task must have finished by the time try returns @@ -1030,7 +1030,7 @@ mod tests { let _ = p.recv(); do m.lock_cond |cond| { if !cond.signal_on(0) { - fail2!(); // success; punt sibling awake. + fail!(); // success; punt sibling awake. } } }; @@ -1274,7 +1274,7 @@ mod tests { let result: result::Result<(),()> = do task::try || { do lock_rwlock_in_mode(&x2, mode1) { - fail2!(); + fail!(); } }; assert!(result.is_err()); @@ -1321,7 +1321,7 @@ mod tests { let mut xopt = Some(xwrite); do y.write_downgrade |_ywrite| { y.downgrade(xopt.take_unwrap()); - error2!("oops, y.downgrade(x) should have failed!"); + error!("oops, y.downgrade(x) should have failed!"); } } } |
