diff options
| author | Nathaniel McCallum <nathaniel@mccallum.life> | 2025-09-13 08:51:28 -0400 |
|---|---|---|
| committer | Nathaniel McCallum <nathaniel@mccallum.life> | 2025-09-24 09:21:44 -0400 |
| commit | d91025316554f9cff948639ee34bf217ef724947 (patch) | |
| tree | c7d5361a6217aa49ca36f11e8569e9bdc993350f | |
| parent | e9385f9eea0221ef295a188d49d16f8f5189abf1 (diff) | |
| download | rust-d91025316554f9cff948639ee34bf217ef724947.tar.gz rust-d91025316554f9cff948639ee34bf217ef724947.zip | |
constify Default on Nanoseconds
| -rw-r--r-- | library/core/src/num/niche_types.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/num/niche_types.rs b/library/core/src/num/niche_types.rs index 610d9d8cf92..9ac0eb72bdc 100644 --- a/library/core/src/num/niche_types.rs +++ b/library/core/src/num/niche_types.rs @@ -112,7 +112,8 @@ impl Nanoseconds { pub const ZERO: Self = unsafe { Nanoseconds::new_unchecked(0) }; } -impl Default for Nanoseconds { +#[rustc_const_unstable(feature = "const_default", issue = "143894")] +impl const Default for Nanoseconds { #[inline] fn default() -> Self { Self::ZERO |
