1
Fork 0

Auto merge of #135384 - saethlin:inline-copy-from-slice, r=joboet

Add #[inline] to copy_from_slice

I'm doing cooked things to CGU partitioning for compiler-builtins (https://github.com/rust-lang/rust/pull/135395) and this was the lone symbol in my compiler-builtins rlib that wasn't an intrinsic. Adding `#[inline]` makes it go away.

Perf report indicates a marginal but chaotic effect on compile time, marginal improvement in codegen. As expected.
This commit is contained in:
bors 2025-01-12 20:16:25 +00:00
commit 48a426eca9

View file

@ -3703,6 +3703,7 @@ impl<T> [T] {
/// [`clone_from_slice`]: slice::clone_from_slice
/// [`split_at_mut`]: slice::split_at_mut
#[doc(alias = "memcpy")]
#[inline]
#[stable(feature = "copy_from_slice", since = "1.9.0")]
#[rustc_const_unstable(feature = "const_copy_from_slice", issue = "131415")]
#[track_caller]