Skip to content

Commit d635cec

Browse files
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.
2 parents e401754 + c6f83b8 commit d635cec

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: compiler/rustc_index_macros/src/newtype.rs

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ impl Parse for Newtype {
263263
impl std::ops::Add<usize> for #name {
264264
type Output = Self;
265265

266+
#[inline]
266267
fn add(self, other: usize) -> Self {
267268
Self::from_usize(self.index() + other)
268269
}

Diff for: compiler/rustc_query_system/src/dep_graph/serialized.rs

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ impl EdgeHeader {
169169
}
170170
}
171171

172+
#[inline]
172173
fn mask(bits: usize) -> usize {
173174
usize::MAX >> ((std::mem::size_of::<usize>() * 8) - bits)
174175
}

0 commit comments

Comments
 (0)