@@ -4,8 +4,8 @@ use std::hash::Hash;
4
4
5
5
use crate :: visit:: { Flags , TypeSuperVisitable , TypeVisitable } ;
6
6
use crate :: {
7
- BoundVar , BoundVars , CanonicalVarInfo , ConstKind , DebruijnIndex , DebugWithInfcx , RegionKind ,
8
- TyKind , UniverseIndex ,
7
+ new , BoundVar , BoundVars , CanonicalVarInfo , ConstKind , DebugWithInfcx , RegionKind , TyKind ,
8
+ UniverseIndex ,
9
9
} ;
10
10
11
11
pub trait Interner : Sized {
@@ -34,7 +34,8 @@ pub trait Interner: Sized {
34
34
+ Into < Self :: GenericArg >
35
35
+ IntoKind < Kind = TyKind < Self > >
36
36
+ TypeSuperVisitable < Self >
37
- + Flags ;
37
+ + Flags
38
+ + new:: Ty < Self > ;
38
39
type Tys : Copy + Debug + Hash + Ord + IntoIterator < Item = Self :: Ty > ;
39
40
type AliasTy : Copy + DebugWithInfcx < Self > + Hash + Ord ;
40
41
type ParamTy : Copy + Debug + Hash + Ord ;
@@ -56,7 +57,8 @@ pub trait Interner: Sized {
56
57
+ IntoKind < Kind = ConstKind < Self > >
57
58
+ ConstTy < Self >
58
59
+ TypeSuperVisitable < Self >
59
- + Flags ;
60
+ + Flags
61
+ + new:: Const < Self > ;
60
62
type AliasConst : Copy + DebugWithInfcx < Self > + Hash + Ord ;
61
63
type PlaceholderConst : Copy + Debug + Hash + Ord + PlaceholderLike ;
62
64
type ParamConst : Copy + Debug + Hash + Ord ;
@@ -71,7 +73,8 @@ pub trait Interner: Sized {
71
73
+ Ord
72
74
+ Into < Self :: GenericArg >
73
75
+ IntoKind < Kind = RegionKind < Self > >
74
- + Flags ;
76
+ + Flags
77
+ + new:: Region < Self > ;
75
78
type EarlyParamRegion : Copy + Debug + Hash + Ord ;
76
79
type LateParamRegion : Copy + Debug + Hash + Ord ;
77
80
type BoundRegion : Copy + Debug + Hash + Ord ;
@@ -90,11 +93,6 @@ pub trait Interner: Sized {
90
93
type ClosureKind : Copy + Debug + Hash + Eq ;
91
94
92
95
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 ;
98
96
}
99
97
100
98
/// Common capabilities of placeholder kinds
0 commit comments