File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -1086,24 +1086,6 @@ impl<'tcx> InstantiatedPredicates<'tcx> {
10861086    } 
10871087} 
10881088
1089- impl < ' tcx >  TraitRef < ' tcx >  { 
1090-     pub  fn  new ( def_id :  DefId ,  substs :  & ' tcx  Substs < ' tcx > )  -> TraitRef < ' tcx >  { 
1091-         TraitRef  {  def_id :  def_id,  substs :  substs } 
1092-     } 
1093- 
1094-     pub  fn  self_ty ( & self )  -> Ty < ' tcx >  { 
1095-         self . substs . type_at ( 0 ) 
1096-     } 
1097- 
1098-     pub  fn  input_types < ' a > ( & ' a  self )  -> impl  DoubleEndedIterator < Item =Ty < ' tcx > >  + ' a  { 
1099-         // Select only the "input types" from a trait-reference. For 
1100-         // now this is all the types that appear in the 
1101-         // trait-reference, but it should eventually exclude 
1102-         // associated types. 
1103-         self . substs . types ( ) 
1104-     } 
1105- } 
1106- 
11071089/// When type checking, we use the `ParameterEnvironment` to track 
11081090/// details about the type/lifetime parameters that are in scope. 
11091091/// It primarily stores the bounds information. 
Original file line number Diff line number Diff line change @@ -389,6 +389,24 @@ pub struct TraitRef<'tcx> {
389389    pub  substs :  & ' tcx  Substs < ' tcx > , 
390390} 
391391
392+ impl < ' tcx >  TraitRef < ' tcx >  { 
393+     pub  fn  new ( def_id :  DefId ,  substs :  & ' tcx  Substs < ' tcx > )  -> TraitRef < ' tcx >  { 
394+         TraitRef  {  def_id :  def_id,  substs :  substs } 
395+     } 
396+ 
397+     pub  fn  self_ty ( & self )  -> Ty < ' tcx >  { 
398+         self . substs . type_at ( 0 ) 
399+     } 
400+ 
401+     pub  fn  input_types < ' a > ( & ' a  self )  -> impl  DoubleEndedIterator < Item =Ty < ' tcx > >  + ' a  { 
402+         // Select only the "input types" from a trait-reference. For 
403+         // now this is all the types that appear in the 
404+         // trait-reference, but it should eventually exclude 
405+         // associated types. 
406+         self . substs . types ( ) 
407+     } 
408+ } 
409+ 
392410pub  type  PolyTraitRef < ' tcx >  = Binder < TraitRef < ' tcx > > ; 
393411
394412impl < ' tcx >  PolyTraitRef < ' tcx >  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments