diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-06-21 20:08:14 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-21 20:08:14 +0900 |
| commit | 18b01d5ea0684ce082c2f2008a0ff9c7e485a442 (patch) | |
| tree | 165732596d230a7f320eff9ae7c51bfbc8a594fa | |
| parent | 51a60911fbf29cdbf6507fbfe7ba18df356a8d1e (diff) | |
| parent | a171a6b7ec4d1c457bf577ef245da99a2877d9b2 (diff) | |
| download | rust-18b01d5ea0684ce082c2f2008a0ff9c7e485a442.tar.gz rust-18b01d5ea0684ce082c2f2008a0ff9c7e485a442.zip | |
Rollup merge of #98313 - m-ou-se:fix-comments, r=joshtriplett
Remove lies in comments. > does not have a const constructor > pub const fn new() -> Self 🤔
| -rw-r--r-- | library/std/src/sys_common/mutex.rs | 7 | ||||
| -rw-r--r-- | library/std/src/sys_common/rwlock.rs | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/library/std/src/sys_common/mutex.rs b/library/std/src/sys_common/mutex.rs index 81eefa1133f..48479f5bdb3 100644 --- a/library/std/src/sys_common/mutex.rs +++ b/library/std/src/sys_common/mutex.rs @@ -46,13 +46,12 @@ impl Drop for StaticMutexGuard { /// An OS-based mutual exclusion lock. /// -/// This mutex does *not* have a const constructor, cleans up its resources in -/// its `Drop` implementation, may safely be moved (when not borrowed), and -/// does not cause UB when used reentrantly. +/// This mutex cleans up its resources in its `Drop` implementation, may safely +/// be moved (when not borrowed), and does not cause UB when used reentrantly. /// /// This mutex does not implement poisoning. /// -/// This is either a wrapper around `Box<imp::Mutex>` or `imp::Mutex`, +/// This is either a wrapper around `LazyBox<imp::Mutex>` or `imp::Mutex`, /// depending on the platform. It is boxed on platforms where `imp::Mutex` may /// not be moved. pub struct MovableMutex(imp::MovableMutex); diff --git a/library/std/src/sys_common/rwlock.rs b/library/std/src/sys_common/rwlock.rs index 265cebfdc3e..ba56f3a8f1b 100644 --- a/library/std/src/sys_common/rwlock.rs +++ b/library/std/src/sys_common/rwlock.rs @@ -62,12 +62,12 @@ impl Drop for StaticRwLockWriteGuard { /// An OS-based reader-writer lock. /// -/// This rwlock does *not* have a const constructor, cleans up its resources in -/// its `Drop` implementation and may safely be moved (when not borrowed). +/// This rwlock cleans up its resources in its `Drop` implementation and may +/// safely be moved (when not borrowed). /// /// This rwlock does not implement poisoning. /// -/// This is either a wrapper around `Box<imp::RwLock>` or `imp::RwLock`, +/// This is either a wrapper around `LazyBox<imp::RwLock>` or `imp::RwLock`, /// depending on the platform. It is boxed on platforms where `imp::RwLock` may /// not be moved. pub struct MovableRwLock(imp::MovableRwLock); |
