Skip to content

Commit af3fec8

Browse files
borsgitbot
authored and
gitbot
committed
Auto merge of rust-lang#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 (rust-lang#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.
2 parents b4bd862 + 52bae79 commit af3fec8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/slice/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3703,6 +3703,7 @@ impl<T> [T] {
37033703
/// [`clone_from_slice`]: slice::clone_from_slice
37043704
/// [`split_at_mut`]: slice::split_at_mut
37053705
#[doc(alias = "memcpy")]
3706+
#[inline]
37063707
#[stable(feature = "copy_from_slice", since = "1.9.0")]
37073708
#[rustc_const_unstable(feature = "const_copy_from_slice", issue = "131415")]
37083709
#[track_caller]

0 commit comments

Comments
 (0)