diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-09-29 11:42:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-29 11:42:05 +0900 |
| commit | 8e4869e8629854dbebc39e6b14a7c8ceab033c58 (patch) | |
| tree | 93f1f3500ea86b6cf4068475ba6180656be61a83 /src/librustdoc/html/static/js/source-script.js | |
| parent | 19e84b91e564eea334691ea064a742b32598d6f9 (diff) | |
| parent | a91327782906885ccd8b8bf25e1e7f9ea46f8428 (diff) | |
| download | rust-8e4869e8629854dbebc39e6b14a7c8ceab033c58.tar.gz rust-8e4869e8629854dbebc39e6b14a7c8ceab033c58.zip | |
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```
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
0 files changed, 0 insertions, 0 deletions
