about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mutex.rs23
-rw-r--r--src/libstd/sync/rwlock.rs23
2 files changed, 22 insertions, 24 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index 846a97b547d..f1d264b38a0 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -536,16 +536,15 @@ mod tests {
         assert_eq!(*lock, 2);
     }
 
-    // FIXME(#25351) needs deeply nested coercions of DST structs.
-    // #[test]
-    // fn test_mutex_unsized() {
-    //     let mutex: &Mutex<[i32]> = &Mutex::new([1, 2, 3]);
-    //     {
-    //         let b = &mut *mutex.lock().unwrap();
-    //         b[0] = 4;
-    //         b[2] = 5;
-    //     }
-    //     let comp: &[i32] = &[4, 2, 5];
-    //     assert_eq!(&*mutex.lock().unwrap(), comp);
-    // }
+    #[test]
+    fn test_mutex_unsized() {
+        let mutex: &Mutex<[i32]> = &Mutex::new([1, 2, 3]);
+        {
+            let b = &mut *mutex.lock().unwrap();
+            b[0] = 4;
+            b[2] = 5;
+        }
+        let comp: &[i32] = &[4, 2, 5];
+        assert_eq!(&*mutex.lock().unwrap(), comp);
+    }
 }
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index 7210328fad8..04ad4708246 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -578,18 +578,17 @@ mod tests {
         assert_eq!(*lock, 2);
     }
 
-    // FIXME(#25351) needs deeply nested coercions of DST structs.
-    // #[test]
-    // fn test_rwlock_unsized() {
-    //     let rw: &RwLock<[i32]> = &RwLock::new([1, 2, 3]);
-    //     {
-    //         let b = &mut *rw.write().unwrap();
-    //         b[0] = 4;
-    //         b[2] = 5;
-    //     }
-    //     let comp: &[i32] = &[4, 2, 5];
-    //     assert_eq!(&*rw.read().unwrap(), comp);
-    // }
+    #[test]
+    fn test_rwlock_unsized() {
+        let rw: &RwLock<[i32]> = &RwLock::new([1, 2, 3]);
+        {
+            let b = &mut *rw.write().unwrap();
+            b[0] = 4;
+            b[2] = 5;
+        }
+        let comp: &[i32] = &[4, 2, 5];
+        assert_eq!(&*rw.read().unwrap(), comp);
+    }
 
     #[test]
     fn test_rwlock_try_write() {