@@ -40,7 +40,7 @@ use traits::{Clause, Clauses, Goal, Goals};
40
40
use ty:: { self , Ty , TypeAndMut } ;
41
41
use ty:: { TyS , TyKind , List } ;
42
42
use ty:: { AdtKind , AdtDef , ClosureSubsts , GeneratorSubsts , Region , Const } ;
43
- use ty:: { PolyFnSig , InferTy , ParamTy , ProjectionTy , ExistentialPredicate , Predicate } ;
43
+ use ty:: { PolyFnSig , InferTy , ProjectionTy , ExistentialPredicate , Predicate } ;
44
44
use ty:: RegionKind ;
45
45
use ty:: { TyVar , TyVid , IntVar , IntVid , FloatVar , FloatVid } ;
46
46
use ty:: TyKind :: * ;
@@ -76,7 +76,7 @@ use syntax::attr;
76
76
use syntax:: source_map:: MultiSpan ;
77
77
use syntax:: edition:: Edition ;
78
78
use syntax:: feature_gate;
79
- use syntax:: symbol:: Symbol ;
79
+ use syntax:: symbol:: { keywords , Symbol } ;
80
80
use syntax_pos:: Span ;
81
81
82
82
use hir;
@@ -2557,11 +2557,19 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
2557
2557
}
2558
2558
2559
2559
pub fn mk_ty_param ( self , def : & ty:: GenericParamDef ) -> Ty < ' tcx > {
2560
- ParamTy :: for_def ( def) . to_ty ( self )
2560
+ self . mk_ty ( ty:: Param ( ty:: ParamTy {
2561
+ idx : def. index ,
2562
+ def_id : def. def_id ,
2563
+ name : def. name ,
2564
+ } ) )
2561
2565
}
2562
2566
2563
2567
pub fn mk_self_type ( self , trait_def_id : DefId ) -> Ty < ' tcx > {
2564
- ParamTy :: for_self ( trait_def_id) . to_ty ( self )
2568
+ self . mk_ty ( ty:: Param ( ty:: ParamTy {
2569
+ idx : 0 ,
2570
+ def_id : trait_def_id,
2571
+ name : keywords:: SelfType . name ( ) . as_interned_str ( ) ,
2572
+ } ) )
2565
2573
}
2566
2574
2567
2575
pub fn mk_param ( self , param : & ty:: GenericParamDef ) -> Kind < ' tcx > {
0 commit comments