From ad7fd6265e62b2170612544caea3b8454ebb3fed Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Sat, 30 May 2020 15:20:09 -0400 Subject: [PATCH] Doctests need feature --- src/libcore/time.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcore/time.rs b/src/libcore/time.rs index cf88ff2e10f..d94f2378058 100644 --- a/src/libcore/time.rs +++ b/src/libcore/time.rs @@ -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());