about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-03-11 11:49:23 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2021-03-11 12:24:43 +0100
commit84bf599bace38787f2237d2aadc5adf55fe662db (patch)
treece0e5f05d3d7580c8e4e885ae5257e7c2b5b29b4 /compiler
parent17a07d71bfd692f9b2dad2a566aff52bf3d4bfe2 (diff)
downloadrust-84bf599bace38787f2237d2aadc5adf55fe662db.tar.gz
rust-84bf599bace38787f2237d2aadc5adf55fe662db.zip
Add inlining.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_data_structures/src/stable_hasher.rs1
-rw-r--r--compiler/rustc_macros/src/hash_stable.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/stable_hasher.rs b/compiler/rustc_data_structures/src/stable_hasher.rs
index 3850c9b74fd..ff28784a1dc 100644
--- a/compiler/rustc_data_structures/src/stable_hasher.rs
+++ b/compiler/rustc_data_structures/src/stable_hasher.rs
@@ -35,6 +35,7 @@ impl StableHasher {
         StableHasher { state: SipHasher128::new_with_keys(0, 0) }
     }
 
+    #[inline]
     pub fn finish<W: StableHasherResult>(self) -> W {
         W::finish(self)
     }
diff --git a/compiler/rustc_macros/src/hash_stable.rs b/compiler/rustc_macros/src/hash_stable.rs
index c955c137782..30569f20793 100644
--- a/compiler/rustc_macros/src/hash_stable.rs
+++ b/compiler/rustc_macros/src/hash_stable.rs
@@ -74,6 +74,7 @@ pub fn hash_stable_generic_derive(mut s: synstructure::Structure<'_>) -> proc_ma
     s.bound_impl(
         quote!(::rustc_data_structures::stable_hasher::HashStable<__CTX>),
         quote! {
+            #[inline]
             fn hash_stable(
                 &self,
                 __hcx: &mut __CTX,
@@ -119,6 +120,7 @@ pub fn hash_stable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::To
             >
         ),
         quote! {
+            #[inline]
             fn hash_stable(
                 &self,
                 __hcx: &mut ::rustc_middle::ich::StableHashingContext<'__ctx>,