Skip to content

Commit 72ec5aa

Browse files
author
Stjepan Glavina
committed
Re-export constants from core into std
1 parent 7f7a2e9 commit 72ec5aa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/libstd/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@
248248
#![feature(const_cstr_unchecked)]
249249
#![feature(core_intrinsics)]
250250
#![feature(dropck_eyepatch)]
251+
#![feature(duration_constants)]
251252
#![feature(exact_size_is_empty)]
252253
#![feature(external_doc)]
253254
#![feature(fixed_size_array)]

src/libstd/time.rs

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ use sys_common::FromInner;
2121
#[stable(feature = "time", since = "1.3.0")]
2222
pub use core::time::Duration;
2323

24+
#[unstable(feature = "duration_constants", issue = "0")]
25+
pub use core::time::{SECOND, MILLISECOND, MICROSECOND, NANOSECOND};
26+
2427
/// A measurement of a monotonically nondecreasing clock.
2528
/// Opaque and useful only with `Duration`.
2629
///

0 commit comments

Comments
 (0)