about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2022-10-01 17:30:54 +0200
committerNikita Popov <nikita.ppv@gmail.com>2022-10-01 17:30:54 +0200
commit49eaa0f6aceb5ea3d4e5535bb0fdcabc13eb77f0 (patch)
treed50f51623e71e8d9e8f0d8091cb16eb3180f72a0
parent744e397d8855f7da87d70aa8d0bd9e0f5f0b51a1 (diff)
downloadrust-49eaa0f6aceb5ea3d4e5535bb0fdcabc13eb77f0.tar.gz
rust-49eaa0f6aceb5ea3d4e5535bb0fdcabc13eb77f0.zip
Mark Cell::replace() as #[inline]
-rw-r--r--library/core/src/cell.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs
index 288cab1ef39..4474b673a95 100644
--- a/library/core/src/cell.rs
+++ b/library/core/src/cell.rs
@@ -405,6 +405,7 @@ impl<T> Cell<T> {
     /// assert_eq!(cell.replace(10), 5);
     /// assert_eq!(cell.get(), 10);
     /// ```
+    #[inline]
     #[stable(feature = "move_cell", since = "1.17.0")]
     pub fn replace(&self, val: T) -> T {
         // SAFETY: This can cause data races if called from a separate thread,