about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-04-19 01:03:43 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2020-04-19 01:03:43 +0900
commit1a461598280f3f0ed047c89d1f2ec10be354e609 (patch)
tree0b0d5b783fa91f16378e43b712d2d0c27847c10c /src/liballoc
parent339a938fa6582d5c6f84d811680a1031c684c1c6 (diff)
downloadrust-1a461598280f3f0ed047c89d1f2ec10be354e609.tar.gz
rust-1a461598280f3f0ed047c89d1f2ec10be354e609.zip
Explain why we shouldn't add inline attr to into_vec
Diffstat (limited to 'src/liballoc')
-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();