Open
Description
opened on Mar 22, 2024
Location
rust/library/std/src/sync/mutex.rs
Lines 186 to 189 in 0ad927c
Summary
I think it is a good idea to document Send
& Sync
impls in types such as Mutex
, RwLock
etc. especially considering they are unsafe
traits.
Also it's not obvious why some types have particular restrictions, for example:
- why
Mutex
isSync
only if theT: Send
- why
MutexGuard
is!Send
It can be done as // SAFETY comments or proper docs.
Metadata
Assignees
Labels
Area: documentation for any part of the project, including the compiler, standard library, and toolsCall for participation: Help is requested to fix this issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the library team, which will review and decide on the PR/issue.
Activity