about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2021-03-21 19:17:07 -0400
committerBen Kimock <kimockb@gmail.com>2021-03-21 19:17:07 -0400
commit73d773482afcceb8475dd773c4e2e70ed4835242 (patch)
tree0934fb48f775769db90fbd109a447072f293347e
parentf5e37100d9c115ab327bafd42d0c4dad539d318f (diff)
downloadrust-73d773482afcceb8475dd773c4e2e70ed4835242.tar.gz
rust-73d773482afcceb8475dd773c4e2e70ed4835242.zip
fmt, change to cold
-rw-r--r--library/alloc/src/raw_vec.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/alloc/src/raw_vec.rs b/library/alloc/src/raw_vec.rs
index ff7bff7584a..dc02c9c883e 100644
--- a/library/alloc/src/raw_vec.rs
+++ b/library/alloc/src/raw_vec.rs
@@ -321,8 +321,12 @@ impl<T, A: Allocator> RawVec<T, A> {
         // Therefore, we move all the resizing and error-handling logic from grow_amortized and
         // handle_reserve behind a call, while making sure that the this function is likely to be
         // inlined as just a comparison and a call if the comparison fails.
-        #[inline(never)]
-        fn do_reserve_and_handle<T, A: Allocator>(slf: &mut RawVec<T,A>, len: usize, additional: usize) {
+        #[cold]
+        fn do_reserve_and_handle<T, A: Allocator>(
+            slf: &mut RawVec<T, A>,
+            len: usize,
+            additional: usize,
+        ) {
             handle_reserve(slf.grow_amortized(len, additional));
         }