mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Mark Duration::is_zero as rustc_const_stable.
This commit is contained in:
parent
d1e23b8af8
commit
b44ae964e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user