]> git.lizzy.rs Git - rust.git/commitdiff
Inline Default::default() for atomics
authorScott Olson <scott@solson.me>
Sun, 1 Nov 2020 04:38:41 +0000 (04:38 +0000)
committerScott Olson <scott@solson.me>
Sun, 1 Nov 2020 04:38:41 +0000 (04:38 +0000)
library/core/src/sync/atomic.rs

index 5c9cfe27101f07edbcfbbe669bf4074ec0385584..a3d93d7074b69e00df0fea87935c5d3efb908731 100644 (file)
@@ -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())
             }