@@ -4,8 +4,8 @@ use std::hash::Hash;
44
55use crate :: visit:: { Flags , TypeSuperVisitable , TypeVisitable } ;
66use crate :: {
7- BoundVar , BoundVars , CanonicalVarInfo , ConstKind , DebruijnIndex , DebugWithInfcx , RegionKind ,
8- TyKind , UniverseIndex ,
7+ new , BoundVar , BoundVars , CanonicalVarInfo , ConstKind , DebugWithInfcx , RegionKind , TyKind ,
8+ UniverseIndex ,
99} ;
1010
1111pub trait Interner : Sized {
@@ -34,7 +34,8 @@ pub trait Interner: Sized {
3434 + Into < Self :: GenericArg >
3535 + IntoKind < Kind = TyKind < Self > >
3636 + TypeSuperVisitable < Self >
37- + Flags ;
37+ + Flags
38+ + new:: Ty < Self > ;
3839 type Tys : Copy + Debug + Hash + Ord + IntoIterator < Item = Self :: Ty > ;
3940 type AliasTy : Copy + DebugWithInfcx < Self > + Hash + Ord ;
4041 type ParamTy : Copy + Debug + Hash + Ord ;
@@ -56,7 +57,8 @@ pub trait Interner: Sized {
5657 + IntoKind < Kind = ConstKind < Self > >
5758 + ConstTy < Self >
5859 + TypeSuperVisitable < Self >
59- + Flags ;
60+ + Flags
61+ + new:: Const < Self > ;
6062 type AliasConst : Copy + DebugWithInfcx < Self > + Hash + Ord ;
6163 type PlaceholderConst : Copy + Debug + Hash + Ord + PlaceholderLike ;
6264 type ParamConst : Copy + Debug + Hash + Ord ;
@@ -71,7 +73,8 @@ pub trait Interner: Sized {
7173 + Ord
7274 + Into < Self :: GenericArg >
7375 + IntoKind < Kind = RegionKind < Self > >
74- + Flags ;
76+ + Flags
77+ + new:: Region < Self > ;
7578 type EarlyParamRegion : Copy + Debug + Hash + Ord ;
7679 type LateParamRegion : Copy + Debug + Hash + Ord ;
7780 type BoundRegion : Copy + Debug + Hash + Ord ;
@@ -90,11 +93,6 @@ pub trait Interner: Sized {
9093 type ClosureKind : Copy + Debug + Hash + Eq ;
9194
9295 fn mk_canonical_var_infos ( self , infos : & [ CanonicalVarInfo < Self > ] ) -> Self :: CanonicalVars ;
93-
94- // FIXME: We should not have all these constructors on `Interner`, but as functions on some trait.
95- fn mk_bound_ty ( self , debruijn : DebruijnIndex , var : BoundVar ) -> Self :: Ty ;
96- fn mk_bound_region ( self , debruijn : DebruijnIndex , var : BoundVar ) -> Self :: Region ;
97- fn mk_bound_const ( self , debruijn : DebruijnIndex , var : BoundVar , ty : Self :: Ty ) -> Self :: Const ;
9896}
9997
10098/// Common capabilities of placeholder kinds
0 commit comments