diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index e8e0cbf84b37d..09bb4519170da 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 SpecArrayClone for T { + #[inline] default fn clone(array: &[T; N]) -> [T; N] { // SAFETY: we know for certain that this iterator will yield exactly `N` // items. @@ -364,6 +365,7 @@ impl SpecArrayClone for T { #[cfg(not(bootstrap))] impl SpecArrayClone for T { + #[inline] fn clone(array: &[T; N]) -> [T; N] { *array }