diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-02-22 18:43:07 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-22 18:43:07 +0530 |
| commit | 4f71270d7b6910ddd123432da5ace0c167006c27 (patch) | |
| tree | a06f4d710ab707d02dda46c37eb70ba81f3bccc5 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | 541b407c140bd8848fdeeba3448bc94ed72fd6a7 (diff) | |
| parent | e1c8c8cf63b48c798c1954749e58e99c6cc50093 (diff) | |
| download | rust-4f71270d7b6910ddd123432da5ace0c167006c27.tar.gz rust-4f71270d7b6910ddd123432da5ace0c167006c27.zip | |
Rollup merge of #69354 - MichaelMcDonnell:duration_overflow_test, r=Centril
Test `Duration::new` panics on overflow A `Duration` is created from a second and nanoseconds variable. The documentation says: "This constructor will panic if the carry from the nanoseconds overflows the seconds counter". This was, however, not tested in the tests. I doubt the behavior will ever regress, but it is usually a good idea to test all documented behavior.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
