Skip to content

Commit

Permalink
Auto merge of rust-lang#119960 - cjgillot:inline-dg, r=<try>
Browse files Browse the repository at this point in the history
Inline 2 functions that appear in dep-graph profiles.

r? `@ghost`
  • Loading branch information
bors committed Jan 14, 2024
2 parents 8847bda + c6f83b8 commit 7811646
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_index_macros/src/newtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ impl Parse for Newtype {
impl std::ops::Add<usize> for #name {
type Output = Self;

#[inline]
fn add(self, other: usize) -> Self {
Self::from_usize(self.index() + other)
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_query_system/src/dep_graph/serialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ impl EdgeHeader {
}
}

#[inline]
fn mask(bits: usize) -> usize {
usize::MAX >> ((std::mem::size_of::<usize>() * 8) - bits)
}
Expand Down

0 comments on commit 7811646

Please sign in to comment.