rust/library
bors a2f3c0cf88 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?
2024-02-25 05:59:54 +00:00
..
alloc Rollup merge of #121556 - GrigorenkoPV:addr_of, r=Nilstrieb 2024-02-24 22:39:01 +01:00
backtrace@6145fe6bac Update backtrace submodule 2023-11-21 16:33:42 +01:00
core Auto merge of #121114 - Nilstrieb:no-inline!, r=saethlin 2024-02-25 03:47:31 +00:00
panic_abort rustc: implement support for `riscv32im_risc0_zkvm_elf` 2024-01-22 10:07:36 -08:00
panic_unwind Get rid of some `#[allow(static_mut_refs)]` 2024-02-23 18:02:25 +03:00
portable-simd Merge commit '649110751ef4f27440d7cc711b3e07d11bf02d4a' into sync-portable-simd-2024-02-18 2024-02-18 10:14:03 -05:00
proc_macro Forbid use of `extern "C-unwind"` inside standard library 2024-02-24 14:53:04 +00:00
profiler_builtins Add support for custom JSON targets when using build-std. 2024-02-05 10:20:42 +00:00
rtstartup library: Fix warnings in rtstartup 2024-01-06 01:32:03 +03:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std Auto merge of #117107 - zachs18:mapped-mutex-guard, r=Amanieu 2024-02-25 05:59:54 +00:00
stdarch@56087ea170 update stdarch 2024-02-24 12:15:21 +01:00
sysroot Expose `compiler-builtins-weak-intrinsics` feature for `-Zbuild-std` 2023-06-23 11:15:34 +01:00
test Use generic `NonZero` everywhere else. 2024-02-22 15:17:34 +01:00
unwind library: use `addr_of!` 2024-02-24 16:02:17 +03:00