Skip to content

Commit 2851e59

Browse files
committed
Auto merge of #69281 - nnethercote:inline-some-encoding-decoding-methods, r=Centril
Inline some encoding and decoding methods. This is a small performance win. r? @Centril
2 parents d3ebd59 + 139c3ca commit 2851e59

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/librustc/ty/codec.rs

+1
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ where
301301
macro_rules! __impl_decoder_methods {
302302
($($name:ident -> $ty:ty;)*) => {
303303
$(
304+
#[inline]
304305
fn $name(&mut self) -> Result<$ty, Self::Error> {
305306
self.opaque.$name()
306307
}

src/librustc/ty/query/on_disk_cache.rs

+1
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ where
943943

944944
macro_rules! encoder_methods {
945945
($($name:ident($ty:ty);)*) => {
946+
#[inline]
946947
$(fn $name(&mut self, value: $ty) -> Result<(), Self::Error> {
947948
self.encoder.$name(value)
948949
})*

0 commit comments

Comments
 (0)