rust/library/std/src/sys_common
bors 3701bdc633 Auto merge of #107329 - joboet:optimize_lazylock, r=m-ou-se
Optimize `LazyLock` size

The initialization function was unnecessarily stored separately from the data to be initialized. Since both cannot exist at the same time, a `union` can be used, with the `Once` acting as discriminant. This unfortunately requires some extra methods on `Once` so that `Drop` can be implemented correctly and efficiently.

`@rustbot` label +T-libs +A-atomic
2023-02-18 09:29:21 +00:00
..
memchr Move std::memchr to sys_common 2021-05-14 03:54:46 +02:00
net Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
once std: optimize LazyLock size 2023-01-26 16:16:03 +01:00
thread_local_key avoid some int2ptr casts in thread_local_key tests 2022-08-11 09:39:25 -04:00
thread_parking std: use id-based thread parking on SOLID 2022-12-31 11:00:54 +01:00
wtf8 Remove is_known_utf8 checks from more tests where it's no longer set. 2022-06-23 13:10:47 -07:00
backtrace.rs Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
fs.rs Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
io.rs Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00
lazy_box.rs Leak pthreax_mutex_t when it's dropped while locked. 2022-06-16 12:09:12 +02:00
memchr.rs Move std::memchr to sys_common 2021-05-14 03:54:46 +02:00
mod.rs std: unify id-based thread parking implementations 2022-12-29 17:45:07 +01:00
net.rs Replace libc::{type} with crate::ffi::{type} 2023-01-28 11:24:13 +05:30
process.rs More verbose Debug implementation of std::process:Command 2022-12-27 09:50:01 +01:00
tests.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
thread.rs Relax memory ordering used in min_stack 2022-05-01 15:55:54 -07:00
thread_info.rs Merge two THREAD_INFO.with and following RefCell borrow 2021-09-16 15:24:53 +02:00
thread_local_dtor.rs refactor[std]: do not use box syntax 2023-01-17 14:08:35 +01:00
thread_local_key.rs Make sentinel value configurable 2022-12-06 09:38:09 +01:00
wstr.rs Extract WStrUnits to sys_common::wstr 2022-11-28 21:17:08 +05:30
wtf8.rs Use associated items of char instead of freestanding items in core::char 2023-01-14 11:58:41 +01:00