Skip to content

Commit

Permalink
Unrolled build for rust-lang#121311
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#121311 - Nilstrieb:is-it-overlapping, r=saethlin

Make `is_nonoverlapping` `#[inline]`

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

backlink to rust-lang#120848

r? ``@saethlin``
  • Loading branch information
rust-timer committed Feb 20, 2024
2 parents bcea3cb + 0b59748 commit 17c454c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 17c454c

Please sign in to comment.