Mark Duration::is_zero as rustc_const_stable.

This commit is contained in:
Mara Bos 2021-04-11 11:36:35 +02:00
parent d1e23b8af8
commit b44ae964e2

View File

@ -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