Skip to content

Commit

Permalink
Rollup merge of #98313 - m-ou-se:fix-comments, r=joshtriplett
Browse files Browse the repository at this point in the history
Remove lies in comments.

> does not have a const constructor

> pub const fn new() -> Self

🤔
  • Loading branch information
matthiaskrgr committed Jun 21, 2022
2 parents 3365a50 + a171a6b commit a6305a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions library/std/src/sys_common/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions library/std/src/sys_common/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a6305a8

Please sign in to comment.