diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2014-03-03 01:01:13 +0100 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2014-03-04 21:10:23 +0100 |
| commit | 3158047a459b6d60d0f8f6bf5c299db0910e029a (patch) | |
| tree | 5af0a174d8541414b399a72ab8e9ae1115e17cc6 /src/libsync | |
| parent | 19fadf6567859bd46d3235c29d61917efc0e0685 (diff) | |
| download | rust-3158047a459b6d60d0f8f6bf5c299db0910e029a.tar.gz rust-3158047a459b6d60d0f8f6bf5c299db0910e029a.zip | |
Cleaned up `std::any`
- Added `TraitObject` representation to `std::raw`. - Added doc to `std::raw`. - Removed `Any::as_void_ptr()` and `Any::as_mut_void_ptr()` methods as they are uneccessary now after the removal of headers on owned boxes. This reduces the number of virtual calls needed. - Made the `..Ext` implementations work directly with the repr of a trait object. - Removed `Any`-related traits from the prelude. - Added bench for `Any`
Diffstat (limited to 'src/libsync')
| -rw-r--r-- | src/libsync/sync/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsync/sync/mod.rs b/src/libsync/sync/mod.rs index 7078f01945e..9fe585c263f 100644 --- a/src/libsync/sync/mod.rs +++ b/src/libsync/sync/mod.rs @@ -976,6 +976,8 @@ mod tests { } #[test] fn test_mutex_killed_simple() { + use std::any::Any; + // Mutex must get automatically unlocked if failed/killed within. let m = Mutex::new(); let m2 = m.clone(); @@ -992,6 +994,8 @@ mod tests { #[ignore(reason = "linked failure")] #[test] fn test_mutex_killed_cond() { + use std::any::Any; + // Getting killed during cond wait must not corrupt the mutex while // unwinding (e.g. double unlock). let m = Mutex::new(); @@ -1019,6 +1023,7 @@ mod tests { #[ignore(reason = "linked failure")] #[test] fn test_mutex_killed_broadcast() { + use std::any::Any; use std::unstable::finally::Finally; let m = Mutex::new(); @@ -1329,6 +1334,8 @@ mod tests { } #[cfg(test)] fn rwlock_kill_helper(mode1: RWLockMode, mode2: RWLockMode) { + use std::any::Any; + // Mutex must get automatically unlocked if failed/killed within. let x = RWLock::new(); let x2 = x.clone(); |
