diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-19 01:04:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-19 01:04:54 +0200 |
| commit | dfdfc76cd92d3d112ff9e8dd9fb22da6f0ac5a4c (patch) | |
| tree | ce10461b3011a0b9213fd11a6a26ca39e2dd7110 /src | |
| parent | cd748abc56108dd6a5cc9f58562a49832742464e (diff) | |
| parent | 1a461598280f3f0ed047c89d1f2ec10be354e609 (diff) | |
| download | rust-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.rs | 3 |
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(); |
