diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-09-29 11:56:42 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-29 11:56:42 +1000 |
| commit | 5373eb12683174e3567067edbe03b704dc99a6cb (patch) | |
| tree | 1c7dacb8961ca61e4988ff88689da2c18a1343a4 /library | |
| parent | 3ea1bab98225515049b90c9dcb53a88d1451874a (diff) | |
| parent | d91025316554f9cff948639ee34bf217ef724947 (diff) | |
| download | rust-5373eb12683174e3567067edbe03b704dc99a6cb.tar.gz rust-5373eb12683174e3567067edbe03b704dc99a6cb.zip | |
Rollup merge of #146979 - npmccallum:nanosecs, r=Mark-Simulacrum
constify Default on Nanoseconds
Diffstat (limited to 'library')
| -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 |
