Doctests need feature
This commit is contained in:
parent
3ff5879f8d
commit
ad7fd6265e
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user