@@ -250,6 +250,7 @@ impl<'a, 'tcx> Metadata<'a, 'tcx> for (CrateMetadataRef<'a>, TyCtxt<'tcx>) {
250
250
}
251
251
252
252
impl < T : ParameterizedOverTcx > LazyValue < T > {
253
+ #[ inline]
253
254
fn decode < ' a , ' tcx , M : Metadata < ' a , ' tcx > > ( self , metadata : M ) -> T :: Value < ' tcx >
254
255
where
255
256
T :: Value < ' tcx > : Decodable < DecodeContext < ' a , ' tcx > > ,
@@ -294,6 +295,7 @@ unsafe impl<'a, 'tcx, T: Decodable<DecodeContext<'a, 'tcx>>> TrustedLen
294
295
}
295
296
296
297
impl < T : ParameterizedOverTcx > LazyArray < T > {
298
+ #[ inline]
297
299
fn decode < ' a , ' tcx , M : Metadata < ' a , ' tcx > > (
298
300
self ,
299
301
metadata : M ,
@@ -420,25 +422,29 @@ impl<'a, 'tcx> TyDecoder for DecodeContext<'a, 'tcx> {
420
422
}
421
423
422
424
impl < ' a , ' tcx > Decodable < DecodeContext < ' a , ' tcx > > for CrateNum {
425
+ #[ inline]
423
426
fn decode ( d : & mut DecodeContext < ' a , ' tcx > ) -> CrateNum {
424
427
let cnum = CrateNum :: from_u32 ( d. read_u32 ( ) ) ;
425
428
d. map_encoded_cnum_to_current ( cnum)
426
429
}
427
430
}
428
431
429
432
impl < ' a , ' tcx > Decodable < DecodeContext < ' a , ' tcx > > for DefIndex {
433
+ #[ inline]
430
434
fn decode ( d : & mut DecodeContext < ' a , ' tcx > ) -> DefIndex {
431
435
DefIndex :: from_u32 ( d. read_u32 ( ) )
432
436
}
433
437
}
434
438
435
439
impl < ' a , ' tcx > Decodable < DecodeContext < ' a , ' tcx > > for ExpnIndex {
440
+ #[ inline]
436
441
fn decode ( d : & mut DecodeContext < ' a , ' tcx > ) -> ExpnIndex {
437
442
ExpnIndex :: from_u32 ( d. read_u32 ( ) )
438
443
}
439
444
}
440
445
441
446
impl < ' a , ' tcx > Decodable < DecodeContext < ' a , ' tcx > > for ast:: AttrId {
447
+ #[ inline]
442
448
fn decode ( d : & mut DecodeContext < ' a , ' tcx > ) -> ast:: AttrId {
443
449
let sess = d. sess . expect ( "can't decode AttrId without Session" ) ;
444
450
sess. parse_sess . attr_id_generator . mk_attr_id ( )
@@ -657,6 +663,7 @@ impl<'a, 'tcx, T> Decodable<DecodeContext<'a, 'tcx>> for LazyValue<T> {
657
663
}
658
664
659
665
impl < ' a , ' tcx , T > Decodable < DecodeContext < ' a , ' tcx > > for LazyArray < T > {
666
+ #[ inline]
660
667
fn decode ( decoder : & mut DecodeContext < ' a , ' tcx > ) -> Self {
661
668
let len = decoder. read_usize ( ) ;
662
669
if len == 0 { LazyArray :: default ( ) } else { decoder. read_lazy_array ( len) }
0 commit comments