Skip to content

Commit

Permalink
Mark Duration::is_zero as rustc_const_stable.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Apr 12, 2021
1 parent d1e23b8 commit b44ae96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b44ae96

Please sign in to comment.