<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/time/tests.rs, branch 1.78.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.78.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.78.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-05-05T13:10:32+00:00</updated>
<entry>
<title>Rollup merge of #103056 - beetrees:timespec-bug-fix, r=thomcc</title>
<updated>2023-05-05T13:10:32+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>99973273+Dylan-DPC@users.noreply.github.com</email>
</author>
<published>2023-05-05T13:10:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3502e483213ad42468700b409ab4a4ecdd8ddf2c'/>
<id>urn:sha1:3502e483213ad42468700b409ab4a4ecdd8ddf2c</id>
<content type='text'>
Fix `checked_{add,sub}_duration` incorrectly returning `None` when `other` has more than `i64::MAX` seconds

Use `checked_{add,sub}_unsigned` in `checked_{add,sub}_duration` so that the correct result is returned when adding/subtracting durations with more than `i64::MAX` seconds.
</content>
</entry>
<entry>
<title>Fix non-associativity of `Instant` math on `aarch64-apple-darwin` targets</title>
<updated>2022-11-13T20:01:42+00:00</updated>
<author>
<name>Joy</name>
<email>51241057+maniwani@users.noreply.github.com</email>
</author>
<published>2022-10-26T18:43:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5008a317ce8e508c390ed12bff281f307313376e'/>
<id>urn:sha1:5008a317ce8e508c390ed12bff281f307313376e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix `checked_{add,sub}_duration` incorrectly returning `None` when `other` has more than `i64::MAX` seconds</title>
<updated>2022-10-14T14:13:20+00:00</updated>
<author>
<name>beetrees</name>
<email>b@beetr.ee</email>
</author>
<published>2022-10-05T21:27:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5def7534e4f86165fd5f984e542c17921dc9fd08'/>
<id>urn:sha1:5def7534e4f86165fd5f984e542c17921dc9fd08</id>
<content type='text'>
</content>
</entry>
<entry>
<title>make many std tests work in Miri</title>
<updated>2022-08-18T22:07:39+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2022-08-04T13:16:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8c8dc125b1bfca49ac8f064b365cb72a658e7cba'/>
<id>urn:sha1:8c8dc125b1bfca49ac8f064b365cb72a658e7cba</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use implicit capture syntax in format_args</title>
<updated>2022-03-10T15:23:40+00:00</updated>
<author>
<name>T-O-R-U-S</name>
<email>bageliq@protonmail.com</email>
</author>
<published>2022-02-12T19:16:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=72a25d05bf1a4b155d74139ef700ff93af6d8e22'/>
<id>urn:sha1:72a25d05bf1a4b155d74139ef700ff93af6d8e22</id>
<content type='text'>
This updates the standard library's documentation to use the new syntax. The
documentation is worthwhile to update as it should be more idiomatic
(particularly for features like this, which are nice for users to get acquainted
with). The general codebase is likely more hassle than benefit to update: it'll
hurt git blame, and generally updates can be done by folks updating the code if
(and when) that makes things more readable with the new format.

A few places in the compiler and library code are updated (mostly just due to
already having been done when this commit was first authored).
</content>
</entry>
<entry>
<title>make Instant::{duration_since, elapsed, sub} saturating and remove workarounds</title>
<updated>2022-02-13T00:04:55+00:00</updated>
<author>
<name>The8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2021-10-15T21:55:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9d8ef1160747a4d033f21803770641f2deb32b25'/>
<id>urn:sha1:9d8ef1160747a4d033f21803770641f2deb32b25</id>
<content type='text'>
This removes all mutex/atomics based workarounds for non-monotonic clocks and makes the previously panicking methods saturating instead.

Effectively this moves the monotonization from `Instant` construction to the comparisons.

This has some observable effects, especially on platforms without monotonic clocks:

* Incorrectly ordered Instant comparisons no longer panic. This may hide some programming errors until someone actually looks at the resulting `Duration`
* `checked_duration_since` will now return `None` in more cases. Previously it only happened when one compared instants obtained in the wrong order or
  manually created ones. Now it also does on backslides.

The upside is reduced complexity and lower overhead of `Instant::now`.
</content>
</entry>
<entry>
<title>Add #[must_use] to remaining std functions (O-Z)</title>
<updated>2021-10-31T03:37:32+00:00</updated>
<author>
<name>John Kugelman</name>
<email>john@kugelman.name</email>
</author>
<published>2021-10-31T03:37:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a81d4b18ea7ee03733e983974400816684f78ebe'/>
<id>urn:sha1:a81d4b18ea7ee03733e983974400816684f78ebe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix tests on wasm targets that have 32bit time_t and don't have threads</title>
<updated>2021-08-20T18:34:23+00:00</updated>
<author>
<name>The8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2021-08-18T20:44:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cd82b4246e7539822666c4bade1b4230550a8309'/>
<id>urn:sha1:cd82b4246e7539822666c4bade1b4230550a8309</id>
<content type='text'>
</content>
</entry>
<entry>
<title>correct overflows in the backslide case, add test</title>
<updated>2021-08-16T20:15:52+00:00</updated>
<author>
<name>The8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2021-08-16T20:15:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ff12ab2d9913ff20db62379378ccddc6bffa9f4e'/>
<id>urn:sha1:ff12ab2d9913ff20db62379378ccddc6bffa9f4e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add benchmarks for 1, 2, 4, 8, 16 threads</title>
<updated>2021-08-12T22:19:03+00:00</updated>
<author>
<name>The8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2021-07-23T21:20:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a98a30976b5aeeb1a2d6145a6cec2544072d9b47'/>
<id>urn:sha1:a98a30976b5aeeb1a2d6145a6cec2544072d9b47</id>
<content type='text'>
</content>
</entry>
</feed>
