Skip to content

Commit d910253

Browse files
committed
constify Default on Nanoseconds
1 parent e9385f9 commit d910253

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/num/niche_types.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ impl Nanoseconds {
112112
pub const ZERO: Self = unsafe { Nanoseconds::new_unchecked(0) };
113113
}
114114

115-
impl Default for Nanoseconds {
115+
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
116+
impl const Default for Nanoseconds {
116117
#[inline]
117118
fn default() -> Self {
118119
Self::ZERO

0 commit comments

Comments
 (0)