We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1e23b8 commit b44ae96Copy full SHA for b44ae96
library/core/src/time.rs
@@ -280,6 +280,7 @@ impl Duration {
280
/// assert!(!Duration::from_secs(1).is_zero());
281
/// ```
282
#[stable(feature = "duration_zero", since = "1.53.0")]
283
+ #[rustc_const_stable(feature = "duration_zero", since = "1.53.0")]
284
#[inline]
285
pub const fn is_zero(&self) -> bool {
286
self.secs == 0 && self.nanos == 0
0 commit comments