about summary refs log tree commit diff
path: root/library/std/src/os/unix/process.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-20 06:12:41 +0000
committerbors <bors@rust-lang.org>2025-05-20 06:12:41 +0000
commitf8e9e7636aabcbc29345d9614432d15b3c0c4ec7 (patch)
treea2f26f4d568a2545c437108f4a08d26215304b86 /library/std/src/os/unix/process.rs
parenta8e4c68dcb4dc1e48a0db294c5323cab0227fcb9 (diff)
parenta29756d0853654cc4deb7c9ed899156f0ed19ca6 (diff)
downloadrust-f8e9e7636aabcbc29345d9614432d15b3c0c4ec7.tar.gz
rust-f8e9e7636aabcbc29345d9614432d15b3c0c4ec7.zip
Auto merge of #139916 - RalfJung:intrinsic-wrappers, r=Mark-Simulacrum
make std::intrinsics functions actually be intrinsics

Most of the functions in `std::intrinsics` are actually intrinsics, but some are not: for historical reasons, `std::intrinsics::{copy,copy_nonoverlapping,write_bytes}` are accessible on stable, and the versions in `std::ptr` are just re-exports. These functions are not intrinsics, but wrappers around the intrinsic, because they add extra debug assertions.

This PR makes the functions in `std::intrinsics` actually be intrinsics.
- The advantage is that we can now use it in tests that need to directly call the intrinsic, thus removing a footgun for compiler development. We also remove the extended user-facing doc comments of these functions out of a file that should be largely internal documentation.
- The downside is that if users are using those functions directly, they will not get the debug assertions any more. Note however that those users are already ignoring a deprecation warning, so I think this is fine. Furthermore, if someone imports the `intrinsic` name of this function and turns that into a function pointer, that will no longer work, since only the wrapper functions can be turned into a function pointer. I would be rather surprised if anyone did this, though... and again, they must have already ignored a deprecation warning. Still, seems worth a crater run, if there's general agreement that we want to go ahead with this change.

(`intrinsics::drop_in_place` also remains not-an-intrinsic, which bugs me, but oh well, not much we can do about it; we can't remove it from the module as the path is accidentally-stable.)

Cc `@rust-lang/libs-api` `@saethlin`
Diffstat (limited to 'library/std/src/os/unix/process.rs')
0 files changed, 0 insertions, 0 deletions