Skip to content

Commit

Permalink
Auto merge of rust-lang#135384 - saethlin:inline-copy-from-slice, r=<…
Browse files Browse the repository at this point in the history
…try>

Add #[inline] to copy_from_slice

r? ghost

I'm doing cooked things to CGU partitioning for compiler-builtins and this was the lone symbol in my compiler-builtins rlib that wasn't an intrinsic. Adding `#[inline]` makes it go away. Let's see if perf is happy with this.
  • Loading branch information
bors committed Jan 11, 2025
2 parents eb54a50 + cda566e commit 8579c43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 8579c43

Please sign in to comment.