mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-01 07:13:24 +03:00
constify Default on Nanoseconds
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user