]> git.proxmox.com Git - rustc.git/blobdiff - src/libstd/sync/rwlock.rs
New upstream version 1.13.0+dfsg1
[rustc.git] / src / libstd / sync / rwlock.rs
index 65b5686de869ca7fb05f9369a3435753612d5a35..7f053c6704b56dffb09b5b32bf135fbc07345ef9 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use prelude::v1::*;
-
 use cell::UnsafeCell;
 use fmt;
 use marker;
@@ -313,6 +311,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for RwLock<T> {
 
 #[stable(feature = "rw_lock_default", since = "1.9.0")]
 impl<T: Default> Default for RwLock<T> {
+    /// Creates a new `RwLock<T>`, with the `Default` value for T.
     fn default() -> RwLock<T> {
         RwLock::new(Default::default())
     }
@@ -385,8 +384,6 @@ impl<'a, T: ?Sized> Drop for RwLockWriteGuard<'a, T> {
 mod tests {
     #![allow(deprecated)] // rand
 
-    use prelude::v1::*;
-
     use rand::{self, Rng};
     use sync::mpsc::channel;
     use thread;
@@ -552,8 +549,6 @@ mod tests {
 
     #[test]
     fn test_rwlock_try_write() {
-        use mem::drop;
-
         let lock = RwLock::new(0isize);
         let read_guard = lock.read().unwrap();