about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2021-11-10 11:57:14 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2021-11-10 11:57:14 -0800
commit5b115fcb6839b94a14fb77acdd738281b4bb3fae (patch)
tree2ddeb56c1ff4fa213d419fffdcb38118389eaa1a /library/core/src/array
parentcc7d8014d720ac800f868a0b7ec854f4a5036e3f (diff)
downloadrust-5b115fcb6839b94a14fb77acdd738281b4bb3fae.tar.gz
rust-5b115fcb6839b94a14fb77acdd738281b4bb3fae.zip
Moar #[inline]
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index e8e0cbf84b3..09bb4519170 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -355,6 +355,7 @@ trait SpecArrayClone: Clone {
 
 #[cfg(not(bootstrap))]
 impl<T: Clone> SpecArrayClone for T {
+    #[inline]
     default fn clone<const N: usize>(array: &[T; N]) -> [T; N] {
         // SAFETY: we know for certain that this iterator will yield exactly `N`
         // items.
@@ -364,6 +365,7 @@ impl<T: Clone> SpecArrayClone for T {
 
 #[cfg(not(bootstrap))]
 impl<T: Copy> SpecArrayClone for T {
+    #[inline]
     fn clone<const N: usize>(array: &[T; N]) -> [T; N] {
         *array
     }