@@ -29,7 +29,7 @@ use crate::mir::interpret::ErrorHandled;
29
29
use rustc_data_structures:: sync:: Lrc ;
30
30
use syntax:: ast;
31
31
use syntax_pos:: { Span , DUMMY_SP } ;
32
- use crate :: ty:: subst:: Substs ;
32
+ use crate :: ty:: subst:: { InternalSubsts , SubstsRef } ;
33
33
use crate :: ty:: { self , AdtKind , List , Ty , TyCtxt , GenericParamDefKind , ToPredicate } ;
34
34
use crate :: ty:: error:: { ExpectedFound , TypeError } ;
35
35
use crate :: ty:: fold:: { TypeFolder , TypeFoldable , TypeVisitor } ;
@@ -565,7 +565,7 @@ pub enum Vtable<'tcx, N> {
565
565
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable ) ]
566
566
pub struct VtableImplData < ' tcx , N > {
567
567
pub impl_def_id : DefId ,
568
- pub substs : & ' tcx Substs < ' tcx > ,
568
+ pub substs : SubstsRef < ' tcx > ,
569
569
pub nested : Vec < N >
570
570
}
571
571
@@ -622,7 +622,7 @@ pub struct VtableFnPointerData<'tcx, N> {
622
622
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable ) ]
623
623
pub struct VtableTraitAliasData < ' tcx , N > {
624
624
pub alias_def_id : DefId ,
625
- pub substs : & ' tcx Substs < ' tcx > ,
625
+ pub substs : SubstsRef < ' tcx > ,
626
626
pub nested : Vec < N > ,
627
627
}
628
628
@@ -963,7 +963,7 @@ fn normalize_and_test_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
963
963
}
964
964
965
965
fn substitute_normalize_and_test_predicates < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
966
- key : ( DefId , & ' tcx Substs < ' tcx > ) )
966
+ key : ( DefId , SubstsRef < ' tcx > ) )
967
967
-> bool
968
968
{
969
969
debug ! ( "substitute_normalize_and_test_predicates(key={:?})" ,
@@ -983,7 +983,7 @@ fn substitute_normalize_and_test_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx
983
983
fn vtable_methods < ' a , ' tcx > (
984
984
tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
985
985
trait_ref : ty:: PolyTraitRef < ' tcx > )
986
- -> Lrc < Vec < Option < ( DefId , & ' tcx Substs < ' tcx > ) > > >
986
+ -> Lrc < Vec < Option < ( DefId , SubstsRef < ' tcx > ) > > >
987
987
{
988
988
debug ! ( "vtable_methods({:?})" , trait_ref) ;
989
989
@@ -992,7 +992,7 @@ fn vtable_methods<'a, 'tcx>(
992
992
let trait_methods = tcx. associated_items ( trait_ref. def_id ( ) )
993
993
. filter ( |item| item. kind == ty:: AssociatedKind :: Method ) ;
994
994
995
- // Now list each method's DefId and Substs (for within its trait).
995
+ // Now list each method's DefId and InternalSubsts (for within its trait).
996
996
// If the method can never be called from this object, produce None.
997
997
trait_methods. map ( move |trait_method| {
998
998
debug ! ( "vtable_methods: trait_method={:?}" , trait_method) ;
@@ -1007,7 +1007,7 @@ fn vtable_methods<'a, 'tcx>(
1007
1007
// the method may have some early-bound lifetimes, add
1008
1008
// regions for those
1009
1009
let substs = trait_ref. map_bound ( |trait_ref|
1010
- Substs :: for_item ( tcx, def_id, |param, _|
1010
+ InternalSubsts :: for_item ( tcx, def_id, |param, _|
1011
1011
match param. kind {
1012
1012
GenericParamDefKind :: Lifetime => tcx. types . re_erased . into ( ) ,
1013
1013
GenericParamDefKind :: Type { ..} => {
0 commit comments