about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-19 01:04:54 +0200
committerGitHub <noreply@github.com>2020-04-19 01:04:54 +0200
commitdfdfc76cd92d3d112ff9e8dd9fb22da6f0ac5a4c (patch)
treece10461b3011a0b9213fd11a6a26ca39e2dd7110 /src
parentcd748abc56108dd6a5cc9f58562a49832742464e (diff)
parent1a461598280f3f0ed047c89d1f2ec10be354e609 (diff)
downloadrust-dfdfc76cd92d3d112ff9e8dd9fb22da6f0ac5a4c.tar.gz
rust-dfdfc76cd92d3d112ff9e8dd9fb22da6f0ac5a4c.zip
Rollup merge of #71287 - JohnTitor:comment-vec, r=RalfJung
Explain why we shouldn't add inline attr to into_vec

Follow-up of #71204
r? @RalfJung
Diffstat (limited to 'src')
-rw-r--r--src/liballoc/slice.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index c13e90a3d70..53477288b59 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -140,6 +140,9 @@ mod hack {
     use crate::string::ToString;
     use crate::vec::Vec;
 
+    // We shouldn't add inline attribute to this since this is used in
+    // `vec!` macro mostly and causes perf regression. See #71204 for
+    // discussion and perf results.
     pub fn into_vec<T>(b: Box<[T]>) -> Vec<T> {
         unsafe {
             let len = b.len();