Skip to content

Commit

Permalink
Inline 2 functions that appear in dep-graph profiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Jan 14, 2024
1 parent 284cb71 commit c6f83b8
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 c6f83b8

Please sign in to comment.