Doctests need feature

This commit is contained in:
Jon Gjengset 2020-05-30 15:20:09 -04:00
parent 3ff5879f8d
commit ad7fd6265e
No known key found for this signature in database
GPG Key ID: 3CB1EC545A706318

View File

@ -228,6 +228,7 @@ pub const fn from_nanos(nanos: u64) -> Duration {
/// # Examples
///
/// ```
/// #![feature(duration_zero)]
/// use std::time::Duration;
///
/// let duration = Duration::zero();
@ -247,6 +248,7 @@ pub const fn zero() -> Duration {
/// # Examples
///
/// ```
/// #![feature(duration_zero)]
/// use std::time::Duration;
///
/// assert!(Duration::zero().is_zero());