Skip to content

Commit

Permalink
Rollup merge of #119960 - cjgillot:inline-dg, r=WaffleLapkin
Browse files Browse the repository at this point in the history
Inline 2 functions that appear in dep-graph profiles.

Those functions are small enough not to deserve a dedicated symbol.
  • Loading branch information
GuillaumeGomez authored Jan 14, 2024
2 parents e401754 + c6f83b8 commit d635cec
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 d635cec

Please sign in to comment.