rust/library/std
Matthias Krüger 2ba0c627de
Rollup merge of #123879 - beetrees:missing-unsafe, r=Mark-Simulacrum
Add missing `unsafe` to some internal `std` functions

Adds `unsafe` to a few internal functions that have safety requirements but were previously not marked as `unsafe`. Specifically:

- `std::sys::pal::unix:🧵:min_stack_size` needs to be `unsafe` as `__pthread_get_minstack` might dereference the passed pointer. All callers currently pass a valid initialised `libc::pthread_attr_t`.
- `std:🧵:Thread::new` (and `new_inner`) need to be `unsafe` as it requires the passed thread name to be valid UTF-8, otherwise `Thread::name` will trigger undefined behaviour. I've taken the opportunity to split out the unnamed thread case into a separate `new_unnamed` function to make the safety requirement clearer. All callers meet the safety requirement now that #123505 has been merged.
2024-04-14 09:01:58 +02:00
..
benches also test parts of std 2024-04-07 10:05:57 +02:00
src Rollup merge of #123879 - beetrees:missing-unsafe, r=Mark-Simulacrum 2024-04-14 09:01:58 +02:00
tests also test parts of std 2024-04-07 10:05:57 +02:00
build.rs Support for visionOS 2024-03-18 20:45:45 -07:00
Cargo.toml add platform-specific function to get the error number for HermitOS 2024-02-28 23:01:56 +01:00