From b44ae964e2086b280a250dea62abad29164eea58 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Sun, 11 Apr 2021 11:36:35 +0200 Subject: [PATCH] Mark Duration::is_zero as rustc_const_stable. --- library/core/src/time.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/time.rs b/library/core/src/time.rs index f6d480ae54b38..fa6a6c2cccc01 100644 --- a/library/core/src/time.rs +++ b/library/core/src/time.rs @@ -280,6 +280,7 @@ impl Duration { /// assert!(!Duration::from_secs(1).is_zero()); /// ``` #[stable(feature = "duration_zero", since = "1.53.0")] + #[rustc_const_stable(feature = "duration_zero", since = "1.53.0")] #[inline] pub const fn is_zero(&self) -> bool { self.secs == 0 && self.nanos == 0