about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/errors.rs
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2025-05-28 10:28:07 -0400
committerGitHub <noreply@github.com>2025-05-28 10:28:07 -0400
commit5f17779a03746af581d8867449b1627404d8cd3f (patch)
tree3d3fd8a0cf752df68254482bae70eb5d9ce4b2e2 /compiler/rustc_builtin_macros/src/errors.rs
parent77101febcc9662a076ff43887497cd5b30674d93 (diff)
parent20589bd6050ff9596348c751231ac84b7538adb4 (diff)
downloadrust-5f17779a03746af581d8867449b1627404d8cd3f.tar.gz
rust-5f17779a03746af581d8867449b1627404d8cd3f.zip
Rollup merge of #140369 - jplatte:mutex-rwlock-data-ptr, r=Amanieu
Add data_ptr method to Mutex and RwLock

Implementation of https://github.com/rust-lang/rust/issues/140368 / https://github.com/rust-lang/libs-team/issues/531.

I tried to write a useful safety section about when it is safe to read or write through the returned pointers, but couldn't come up with something nice. Hoping this PR is still useful without that. I'm happy to add any doc strings other people come up with if needed before merge, of course.

Unresolved questions:

- Return a `LockResult` or not?
- Return `*mut T` like existing APIs (`Cell::as_ptr` / `MaybeUninit::as[_mut]_ptr` / `Vec::as_ptr` / ...) or be more precise and return `NonNull<T>`?
Diffstat (limited to 'compiler/rustc_builtin_macros/src/errors.rs')
0 files changed, 0 insertions, 0 deletions