diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 5c9cfe27101..a3d93d7074b 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -155,6 +155,7 @@ pub struct AtomicBool { #[stable(feature = "rust1", since = "1.0.0")] impl Default for AtomicBool { /// Creates an `AtomicBool` initialized to `false`. + #[inline] fn default() -> Self { Self::new(false) } @@ -1212,6 +1213,7 @@ pub struct $atomic_type { #[$stable] impl Default for $atomic_type { + #[inline] fn default() -> Self { Self::new(Default::default()) }