rust/library/core/tests
Christiaan Dirkx 73e0a56dde Make all methods of Duration const
Make the following methods of `Duration` unstable const under `duration_const_2`:
 - `from_secs_f64`
 - `from_secs_f32`
 - `mul_f64`
 - `mul_f32`
 - `div_f64`
 - `div_f32`

This results in all methods of `Duration` being (unstable) const.

Also adds tests for these methods in a const context, moved the test to `library` as part of #76268.

Possible because of #72449, which made the relevant `f32` and `f64` methods const.

Tracking issue: #72440
2020-09-12 15:14:58 +02:00
..
fmt mv std libs to library/ 2020-07-27 19:51:13 -05:00
hash mv std libs to library/ 2020-07-27 19:51:13 -05:00
num flt2dec: properly handle uninitialized memory 2020-09-02 12:41:38 +02:00
alloc.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
any.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
array.rs Add drop check test & MaybeUninit::first_ptr_mut 2020-08-13 03:51:08 +00:00
ascii.rs Move various ui const tests to library 2020-09-04 02:35:27 +02:00
atomic.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
bool.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
cell.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
char.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
clone.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
cmp.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
intrinsics.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
iter.rs Use min_specialization in libcore 2020-08-19 20:08:02 +01:00
lazy.rs Make OnceCell<T> transparent to dropck 2020-08-18 00:34:54 +02:00
lib.rs Make all methods of Duration const 2020-09-12 15:14:58 +02:00
manually_drop.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
mem.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
nonzero.rs Move various ui const tests to library 2020-09-04 02:35:27 +02:00
ops.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
option.rs Fix tests using FixedSizeArray methods (which are now shadowed) 2020-08-30 21:08:18 +02:00
pattern.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
ptr.rs enable align_to tests in Miri 2020-08-19 10:41:51 +02:00
result.rs Fix tests using FixedSizeArray methods (which are now shadowed) 2020-08-30 21:08:18 +02:00
slice.rs Add tests for array_chunks_mut 2020-09-04 19:51:29 -07:00
str_lossy.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
str.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
time.rs Make all methods of Duration const 2020-09-12 15:14:58 +02:00
tuple.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00