diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-11 11:49:23 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-11 12:24:43 +0100 |
| commit | 84bf599bace38787f2237d2aadc5adf55fe662db (patch) | |
| tree | ce0e5f05d3d7580c8e4e885ae5257e7c2b5b29b4 /compiler | |
| parent | 17a07d71bfd692f9b2dad2a566aff52bf3d4bfe2 (diff) | |
| download | rust-84bf599bace38787f2237d2aadc5adf55fe662db.tar.gz rust-84bf599bace38787f2237d2aadc5adf55fe662db.zip | |
Add inlining.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_data_structures/src/stable_hasher.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_macros/src/hash_stable.rs | 2 |
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>, |
