about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2024-02-20 07:35:48 +0100
committerGitHub <noreply@github.com>2024-02-20 07:35:48 +0100
commit9788b192bb9e8c0730ec239d0af80496e809b9b1 (patch)
tree7b4b1fd1bb2d8a20c0eb27b345e41025eb86acf5
parentdcb7c6919f902c03e0a87d63e9dd8175594d8c8a (diff)
parent0b597488075b7e3332a1ef366365eb245480008b (diff)
downloadrust-9788b192bb9e8c0730ec239d0af80496e809b9b1.tar.gz
rust-9788b192bb9e8c0730ec239d0af80496e809b9b1.zip
Rollup merge of #121311 - Nilstrieb:is-it-overlapping, r=saethlin
Make `is_nonoverlapping` `#[inline]`

It showed up with 3% execution time in a compiler profile.

backlink to #120848

r? ``@saethlin``
-rw-r--r--library/core/src/intrinsics.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs
index ce1876d5a2f..9ee61f97c91 100644
--- a/library/core/src/intrinsics.rs
+++ b/library/core/src/intrinsics.rs
@@ -2693,6 +2693,7 @@ pub(crate) fn is_valid_allocation_size(size: usize, len: usize) -> bool {
 
 /// Checks whether the regions of memory starting at `src` and `dst` of size
 /// `count * size` do *not* overlap.
+#[inline]
 pub(crate) fn is_nonoverlapping(src: *const (), dst: *const (), size: usize, count: usize) -> bool {
     let src_usize = src.addr();
     let dst_usize = dst.addr();