diff options
| author | bors <bors@rust-lang.org> | 2025-01-12 20:16:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-01-12 20:16:25 +0000 |
| commit | 48a426eca9df23b24b3559e545cf88dee61d4de9 (patch) | |
| tree | 80a15318e0963cd644d1bc5f80b8a88926a341f8 /library/core/src | |
| parent | 627513a764a696b59bb2679cc1731a197a088a1d (diff) | |
| parent | cda566e22685414bc186468895cd1d9c1c08cf8d (diff) | |
| download | rust-48a426eca9df23b24b3559e545cf88dee61d4de9.tar.gz rust-48a426eca9df23b24b3559e545cf88dee61d4de9.zip | |
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.
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/slice/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 8939e5072ba..5a22110880c 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -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] |
