rust/library
Yuki Okushi 8e4869e862
Rollup merge of #102368 - beetrees:nano-niche, r=joshtriplett
Add a niche to `Duration`, unix `SystemTime`, and non-apple `Instant`

As the nanoseconds fields is always between `0` and `(NANOS_PER_SEC - 1)` inclusive, use the `rustc_layout_scalar_valid_range` attributes to create a niche in the nanosecond field of `Duration` and `Timespec` (which is used to implement unix `SystemTime` and non-apple unix `Instant`; windows `Instant` is implemented with `Duration` and therefore will also benefit). This change has the benefit of making `Option<T>` the same size as `T` for the previously mentioned types. Also shrinks the nanoseconds field of `Timespec` to a `u32` as nanoseconds do not need the extra range of an `i64`, shrinking `Timespec` by 4 bytes on 32-bit platforms.

r? ```@joshtriplett```
2022-09-29 11:42:05 +09:00
..
alloc Rollup merge of #102232 - Urgau:stabilize-bench_black_box, r=TaKO8Ki 2022-09-28 13:07:17 +09:00
backtrace@07872f28cd Update backtrace 2022-09-02 16:09:58 -04:00
core Rollup merge of #102368 - beetrees:nano-niche, r=joshtriplett 2022-09-29 11:42:05 +09:00
panic_abort Update comment about personalities in panic_abort 2022-08-23 16:12:58 +08:00
panic_unwind Auto merge of #92845 - Amanieu:std_personality, r=Mark-Simulacrum 2022-08-28 04:16:29 +00:00
portable-simd separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
proc_macro Fix typo in proc_macro Span::eq 2022-09-17 19:15:30 -04:00
profiler_builtins Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-core Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Rollup merge of #102368 - beetrees:nano-niche, r=joshtriplett 2022-09-29 11:42:05 +09:00
stdarch@699c093a42 Update stdarch 2022-09-15 13:05:28 -04:00
test Stabilize bench_black_box 2022-09-27 17:38:51 +02:00
unwind unwind: don't build dependency when building for Miri 2022-08-15 12:54:12 -04:00