Rollup merge of #119960 - cjgillot:inline-dg, r=WaffleLapkin

Inline 2 functions that appear in dep-graph profiles.

Those functions are small enough not to deserve a dedicated symbol.
This commit is contained in:
Guillaume Gomez 2024-01-14 20:17:24 +01:00 committed by GitHub
commit d635cec7c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -263,6 +263,7 @@ impl #name {
impl std::ops::Add<usize> for #name {
type Output = Self;
#[inline]
fn add(self, other: usize) -> Self {
Self::from_usize(self.index() + other)
}

View File

@ -169,6 +169,7 @@ fn mask(self) -> u32 {
}
}
#[inline]
fn mask(bits: usize) -> usize {
usize::MAX >> ((std::mem::size_of::<usize>() * 8) - bits)
}