about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorPoliorcetics <poliorcetics@users.noreply.github.com>2020-06-08 16:29:47 +0200
committerGitHub <noreply@github.com>2020-06-08 16:29:47 +0200
commitfdef1a5915332a3f9012b41f4176cf2a16025257 (patch)
treecc4d0cce9a207bc976e8773e27c5e8d00fdaddcb /src/libstd/sync
parent9c8f881ccd050f06387612e4b8aa18111c51a63b (diff)
downloadrust-fdef1a5915332a3f9012b41f4176cf2a16025257.tar.gz
rust-fdef1a5915332a3f9012b41f4176cf2a16025257.zip
Simply use drop instead of std::mem::drop
Co-authored-by: LeSeulArtichaut <leseulartichaut@gmail.com>
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mutex.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index 633496154ae..c2c86fae654 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -139,7 +139,7 @@ use crate::sys_common::poison::{self, LockResult, TryLockError, TryLockResult};
 ///         // and the thread still has work to do. This allow other threads to
 ///         // start working on the data immediately, without waiting
 ///         // for the rest of the unrelated work to be done here.
-///         std::mem::drop(data);
+///         drop(data);
 ///         *res_mutex_clone.lock().unwrap() += result;
 ///     }));
 /// });
@@ -156,7 +156,7 @@ use crate::sys_common::poison::{self, LockResult, TryLockError, TryLockResult};
 /// // It's even more important here because we `.join` the threads after that.
 /// // If we had not dropped the lock, a thread could be waiting forever for
 /// // it, causing a deadlock.
-/// std::mem::drop(data);
+/// drop(data);
 /// // Here the lock is not assigned to a variable and so, even if the scope
 /// // does not end after this line, the mutex is still released:
 /// // there is no deadlock.