about summary refs log tree commit diff
path: root/tests/codegen/array-equality.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-25 05:59:54 +0000
committerbors <bors@rust-lang.org>2024-02-25 05:59:54 +0000
commita2f3c0cf880ad819c4eab2b320525b6a31ac6513 (patch)
tree29f469d7176cdf4b10022c3fb5bae4bac05cc4f7 /tests/codegen/array-equality.rs
parente9f95949138125bb1b98ed213a41b9aa825bacf5 (diff)
parent8aaa04b5c5c1d47ee4c4622908f303b8b9632979 (diff)
downloadrust-a2f3c0cf880ad819c4eab2b320525b6a31ac6513.tar.gz
rust-a2f3c0cf880ad819c4eab2b320525b6a31ac6513.zip
Auto merge of #117107 - zachs18:mapped-mutex-guard, r=Amanieu
Implement `MappedMutexGuard`, `MappedRwLockReadGuard`, and `MappedRwLockWriteGuard`.

ACP: https://github.com/rust-lang/libs-team/issues/260
Tracking issue: https://github.com/rust-lang/rust/issues/117108

<details> <summary> (Outdated) </summary>

`MutexState`/`RwLockState` structs

~~Having `sys::(Mutex|RwLock)` and `poison::Flag` as separate fields in the `Mutex`/`RwLock` would require `MappedMutexGuard`/`MappedRwLockWriteGuard` to hold an additional pointer, so I combined the two fields into a `MutexState`/`RwLockState` struct. This should not noticeably affect perf or layout, but requires an additional field projection when accessing the former `.inner` or `.poison` fields (now `.state.inner` and `.state.poison`).~~ If this is not desired, then `MappedMutexGuard`/`MappedRwLockWriteGuard` can instead hold separate pointers to the two fields.

</details>

The doc-comments are mostly copied from the existing `*Guard` doc-comments, with some parts from `lock_api::Mapped*Guard`'s doc-comments.

Unresolved question: Are more tests needed?
Diffstat (limited to 'tests/codegen/array-equality.rs')
0 files changed, 0 insertions, 0 deletions