This repository was archived by the owner on May 28, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 7 files changed +20
-0
lines changed Expand file tree Collapse file tree 7 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -416,6 +416,7 @@ impl<'tcx> ut::UnifyKey for TyVidEqKey<'tcx> {
416416    fn  index ( & self )  -> u32  { 
417417        self . vid . as_u32 ( ) 
418418    } 
419+     #[ inline]  
419420    fn  from_index ( i :  u32 )  -> Self  { 
420421        TyVidEqKey :: from ( ty:: TyVid :: from_u32 ( i) ) 
421422    } 
Original file line number Diff line number Diff line change @@ -32,9 +32,11 @@ impl<'tcx> From<ty::RegionVid> for RegionVidKey<'tcx> {
3232
3333impl < ' tcx >  UnifyKey  for  RegionVidKey < ' tcx >  { 
3434    type  Value  = UnifiedRegion < ' tcx > ; 
35+     #[ inline]  
3536    fn  index ( & self )  -> u32  { 
3637        self . vid . as_u32 ( ) 
3738    } 
39+     #[ inline]  
3840    fn  from_index ( i :  u32 )  -> Self  { 
3941        RegionVidKey :: from ( ty:: RegionVid :: from_u32 ( i) ) 
4042    } 
@@ -118,9 +120,11 @@ pub struct ConstVarValue<'tcx> {
118120
119121impl < ' tcx >  UnifyKey  for  ty:: ConstVid < ' tcx >  { 
120122    type  Value  = ConstVarValue < ' tcx > ; 
123+     #[ inline]  
121124    fn  index ( & self )  -> u32  { 
122125        self . index 
123126    } 
127+     #[ inline]  
124128    fn  from_index ( i :  u32 )  -> Self  { 
125129        ty:: ConstVid  {  index :  i,  phantom :  PhantomData  } 
126130    } 
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ pub enum GenericArgKind<'tcx> {
4848} 
4949
5050impl < ' tcx >  GenericArgKind < ' tcx >  { 
51+     #[ inline]  
5152    fn  pack ( self )  -> GenericArg < ' tcx >  { 
5253        let  ( tag,  ptr)  = match  self  { 
5354            GenericArgKind :: Lifetime ( lt)  => { 
@@ -94,18 +95,21 @@ impl<'tcx> PartialOrd for GenericArg<'tcx> {
9495} 
9596
9697impl < ' tcx >  From < ty:: Region < ' tcx > >  for  GenericArg < ' tcx >  { 
98+     #[ inline]  
9799    fn  from ( r :  ty:: Region < ' tcx > )  -> GenericArg < ' tcx >  { 
98100        GenericArgKind :: Lifetime ( r) . pack ( ) 
99101    } 
100102} 
101103
102104impl < ' tcx >  From < Ty < ' tcx > >  for  GenericArg < ' tcx >  { 
105+     #[ inline]  
103106    fn  from ( ty :  Ty < ' tcx > )  -> GenericArg < ' tcx >  { 
104107        GenericArgKind :: Type ( ty) . pack ( ) 
105108    } 
106109} 
107110
108111impl < ' tcx >  From < ty:: Const < ' tcx > >  for  GenericArg < ' tcx >  { 
112+     #[ inline]  
109113    fn  from ( c :  ty:: Const < ' tcx > )  -> GenericArg < ' tcx >  { 
110114        GenericArgKind :: Const ( c) . pack ( ) 
111115    } 
Original file line number Diff line number Diff line change @@ -222,9 +222,11 @@ impl From<Local> for UnifyLocal {
222222
223223impl  UnifyKey  for  UnifyLocal  { 
224224    type  Value  = ( ) ; 
225+     #[ inline]  
225226    fn  index ( & self )  -> u32  { 
226227        self . 0 . as_u32 ( ) 
227228    } 
229+     #[ inline]  
228230    fn  from_index ( u :  u32 )  -> Self  { 
229231        Self ( Local :: from_u32 ( u) ) 
230232    } 
Original file line number Diff line number Diff line change @@ -172,10 +172,12 @@ impl LocalExpnId {
172172    /// The ID of the theoretical expansion that generates freshly parsed, unexpanded AST. 
173173     pub  const  ROOT :  LocalExpnId  = LocalExpnId :: from_u32 ( 0 ) ; 
174174
175+     #[ inline]  
175176    pub  fn  from_raw ( idx :  ExpnIndex )  -> LocalExpnId  { 
176177        LocalExpnId :: from_u32 ( idx. as_u32 ( ) ) 
177178    } 
178179
180+     #[ inline]  
179181    pub  fn  as_raw ( self )  -> ExpnIndex  { 
180182        ExpnIndex :: from_u32 ( self . as_u32 ( ) ) 
181183    } 
Original file line number Diff line number Diff line change @@ -1541,11 +1541,13 @@ impl Default for TargetOptions {
15411541impl  Deref  for  Target  { 
15421542    type  Target  = TargetOptions ; 
15431543
1544+     #[ inline]  
15441545    fn  deref ( & self )  -> & Self :: Target  { 
15451546        & self . options 
15461547    } 
15471548} 
15481549impl  DerefMut  for  Target  { 
1550+     #[ inline]  
15491551    fn  deref_mut ( & mut  self )  -> & mut  Self :: Target  { 
15501552        & mut  self . options 
15511553    } 
Original file line number Diff line number Diff line change @@ -400,9 +400,11 @@ pub enum InferTy {
400400/// they carry no values. 
401401impl  UnifyKey  for  TyVid  { 
402402    type  Value  = ( ) ; 
403+     #[ inline]  
403404    fn  index ( & self )  -> u32  { 
404405        self . as_u32 ( ) 
405406    } 
407+     #[ inline]  
406408    fn  from_index ( i :  u32 )  -> TyVid  { 
407409        TyVid :: from_u32 ( i) 
408410    } 
@@ -419,6 +421,7 @@ impl UnifyKey for IntVid {
419421    fn  index ( & self )  -> u32  { 
420422        self . index 
421423    } 
424+     #[ inline]  
422425    fn  from_index ( i :  u32 )  -> IntVid  { 
423426        IntVid  {  index :  i } 
424427    } 
@@ -431,9 +434,11 @@ impl EqUnifyValue for FloatVarValue {}
431434
432435impl  UnifyKey  for  FloatVid  { 
433436    type  Value  = Option < FloatVarValue > ; 
437+     #[ inline]  
434438    fn  index ( & self )  -> u32  { 
435439        self . index 
436440    } 
441+     #[ inline]  
437442    fn  from_index ( i :  u32 )  -> FloatVid  { 
438443        FloatVid  {  index :  i } 
439444    } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments