diff --git a/compiler/rustc_index_macros/src/newtype.rs b/compiler/rustc_index_macros/src/newtype.rs index df1318c835e2b..ede8416125d6a 100644 --- a/compiler/rustc_index_macros/src/newtype.rs +++ b/compiler/rustc_index_macros/src/newtype.rs @@ -263,6 +263,7 @@ impl Parse for Newtype { impl std::ops::Add for #name { type Output = Self; + #[inline] fn add(self, other: usize) -> Self { Self::from_usize(self.index() + other) } diff --git a/compiler/rustc_query_system/src/dep_graph/serialized.rs b/compiler/rustc_query_system/src/dep_graph/serialized.rs index 504763f6cdb38..f6f6aa07cb3f6 100644 --- a/compiler/rustc_query_system/src/dep_graph/serialized.rs +++ b/compiler/rustc_query_system/src/dep_graph/serialized.rs @@ -169,6 +169,7 @@ impl EdgeHeader { } } +#[inline] fn mask(bits: usize) -> usize { usize::MAX >> ((std::mem::size_of::() * 8) - bits) }