about summary refs log tree commit diff
path: root/src/libstd/sync/rwlock.rs
diff options
context:
space:
mode:
authorLee Jeffery <lee@leejeffery.co.uk>2015-09-20 11:35:08 +0100
committerEljay <lee@leejeffery.co.uk>2015-09-20 11:37:08 +0100
commit140e2d3a092ebbeea5e110222bea3b37bc49abb8 (patch)
treee13caff70cf1fc86248a29767ab47220c42d7256 /src/libstd/sync/rwlock.rs
parentfd38a75077a4c5efc87413b7f9f7f1b6bc9db9af (diff)
downloadrust-140e2d3a092ebbeea5e110222bea3b37bc49abb8.tar.gz
rust-140e2d3a092ebbeea5e110222bea3b37bc49abb8.zip
Miscellaneous cleanup for old issues.
Diffstat (limited to 'src/libstd/sync/rwlock.rs')
-rw-r--r--src/libstd/sync/rwlock.rs23
1 files changed, 11 insertions, 12 deletions
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() {