@@ -22,7 +22,7 @@ use crate::middle::resolve_lifetime::{self, ObjectLifetimeDefault};
22
22
use crate :: middle:: stability;
23
23
use crate :: mir:: { self , Mir , interpret, ProjectionKind } ;
24
24
use crate :: mir:: interpret:: Allocation ;
25
- use crate :: ty:: subst:: { Kind , Substs , Subst , SubstsRef } ;
25
+ use crate :: ty:: subst:: { Kind , InternalSubsts , Subst , SubstsRef } ;
26
26
use crate :: ty:: ReprOptions ;
27
27
use crate :: traits;
28
28
use crate :: traits:: { Clause , Clauses , GoalKind , Goal , Goals } ;
@@ -118,7 +118,7 @@ pub struct CtxtInterners<'tcx> {
118
118
/// they're accessed quite often.
119
119
type_ : InternedSet < ' tcx , TyS < ' tcx > > ,
120
120
type_list : InternedSet < ' tcx , List < Ty < ' tcx > > > ,
121
- substs : InternedSet < ' tcx , Substs < ' tcx > > ,
121
+ substs : InternedSet < ' tcx , InternalSubsts < ' tcx > > ,
122
122
canonical_var_infos : InternedSet < ' tcx , List < CanonicalVarInfo > > ,
123
123
region : InternedSet < ' tcx , RegionKind > ,
124
124
existential_predicates : InternedSet < ' tcx , List < ExistentialPredicate < ' tcx > > > ,
@@ -557,7 +557,7 @@ impl<'tcx> TypeckTables<'tcx> {
557
557
558
558
pub fn node_substs ( & self , id : hir:: HirId ) -> SubstsRef < ' tcx > {
559
559
validate_hir_id_for_typeck_tables ( self . local_id_root , id, false ) ;
560
- self . node_substs . get ( & id. local_id ) . cloned ( ) . unwrap_or_else ( || Substs :: empty ( ) )
560
+ self . node_substs . get ( & id. local_id ) . cloned ( ) . unwrap_or_else ( || InternalSubsts :: empty ( ) )
561
561
}
562
562
563
563
pub fn node_substs_opt ( & self , id : hir:: HirId ) -> Option < SubstsRef < ' tcx > > {
@@ -1807,7 +1807,7 @@ nop_list_lift!{Predicate<'a> => Predicate<'tcx>}
1807
1807
nop_list_lift ! { CanonicalVarInfo => CanonicalVarInfo }
1808
1808
nop_list_lift ! { ProjectionKind <' a> => ProjectionKind <' tcx>}
1809
1809
1810
- // this is the impl for `&'a Substs <'a>`
1810
+ // this is the impl for `&'a InternalSubsts <'a>`
1811
1811
nop_list_lift ! { Kind <' a> => Kind <' tcx>}
1812
1812
1813
1813
impl < ' a , ' tcx > Lift < ' tcx > for & ' a mir:: interpret:: Allocation {
@@ -2183,7 +2183,7 @@ impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx> {
2183
2183
Generator , GeneratorWitness , Dynamic , Closure , Tuple , Bound ,
2184
2184
Param , Infer , UnnormalizedProjection , Projection , Opaque , Foreign ) ;
2185
2185
2186
- println ! ( "Substs interner: #{}" , self . interners. substs. borrow( ) . len( ) ) ;
2186
+ println ! ( "InternalSubsts interner: #{}" , self . interners. substs. borrow( ) . len( ) ) ;
2187
2187
println ! ( "Region interner: #{}" , self . interners. region. borrow( ) . len( ) ) ;
2188
2188
println ! ( "Stability interner: #{}" , self . stability_interner. borrow( ) . len( ) ) ;
2189
2189
println ! ( "Allocation interner: #{}" , self . allocation_interner. borrow( ) . len( ) ) ;
@@ -2250,7 +2250,7 @@ impl<'tcx: 'lcx, 'lcx> Borrow<[CanonicalVarInfo]> for Interned<'tcx, List<Canoni
2250
2250
}
2251
2251
}
2252
2252
2253
- impl < ' tcx : ' lcx , ' lcx > Borrow < [ Kind < ' lcx > ] > for Interned < ' tcx , Substs < ' tcx > > {
2253
+ impl < ' tcx : ' lcx , ' lcx > Borrow < [ Kind < ' lcx > ] > for Interned < ' tcx , InternalSubsts < ' tcx > > {
2254
2254
fn borrow < ' a > ( & ' a self ) -> & ' a [ Kind < ' lcx > ] {
2255
2255
& self . 0 [ ..]
2256
2256
}
@@ -2520,7 +2520,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
2520
2520
pub fn mk_box ( self , ty : Ty < ' tcx > ) -> Ty < ' tcx > {
2521
2521
let def_id = self . require_lang_item ( lang_items:: OwnedBoxLangItem ) ;
2522
2522
let adt_def = self . adt_def ( def_id) ;
2523
- let substs = Substs :: for_item ( self , def_id, |param, substs| {
2523
+ let substs = InternalSubsts :: for_item ( self , def_id, |param, substs| {
2524
2524
match param. kind {
2525
2525
GenericParamDefKind :: Lifetime => bug ! ( ) ,
2526
2526
GenericParamDefKind :: Type { has_default, .. } => {
0 commit comments