@@ -2,23 +2,17 @@ use smallvec::SmallVec;
22use std:: fmt:: Debug ;
33use std:: hash:: Hash ;
44
5- use crate :: fold:: TypeSuperFoldable ;
65use crate :: inherent:: * ;
76use crate :: ir_print:: IrPrint ;
87use crate :: visit:: { Flags , TypeSuperVisitable , TypeVisitable } ;
9- use crate :: { CanonicalVarInfo , ConstKind , DebugWithInfcx , RegionKind , TraitRef , TyKind } ;
8+ use crate :: { CanonicalVarInfo , DebugWithInfcx , TraitRef } ;
109
1110pub trait Interner : Sized + Copy + IrPrint < TraitRef < Self > > {
1211 type DefId : Copy + Debug + Hash + Eq ;
1312 type DefiningOpaqueTypes : Copy + Debug + Hash + Default + Eq + TypeVisitable < Self > ;
1413 type AdtDef : Copy + Debug + Hash + Eq ;
1514
16- type GenericArgs : Copy
17- + DebugWithInfcx < Self >
18- + Hash
19- + Eq
20- + IntoIterator < Item = Self :: GenericArg >
21- + GenericArgs < Self > ;
15+ type GenericArgs : GenericArgs < Self > ;
2216 type GenericArg : Copy + DebugWithInfcx < Self > + Hash + Eq ;
2317 type Term : Copy + Debug + Hash + Eq ;
2418
@@ -29,21 +23,12 @@ pub trait Interner: Sized + Copy + IrPrint<TraitRef<Self>> {
2923 type CanonicalVars : Copy + Debug + Hash + Eq + IntoIterator < Item = CanonicalVarInfo < Self > > ;
3024
3125 // Kinds of tys
32- type Ty : Copy
33- + DebugWithInfcx < Self >
34- + Hash
35- + Eq
36- + Into < Self :: GenericArg >
37- + IntoKind < Kind = TyKind < Self > >
38- + TypeSuperVisitable < Self >
39- + TypeSuperFoldable < Self >
40- + Flags
41- + Ty < Self > ;
26+ type Ty : Ty < Self > ;
4227 type Tys : Copy + Debug + Hash + Eq + IntoIterator < Item = Self :: Ty > ;
4328 type AliasTy : Copy + DebugWithInfcx < Self > + Hash + Eq ;
4429 type ParamTy : Copy + Debug + Hash + Eq ;
4530 type BoundTy : Copy + Debug + Hash + Eq ;
46- type PlaceholderTy : Copy + Debug + Hash + Eq + PlaceholderLike ;
31+ type PlaceholderTy : PlaceholderLike ;
4732
4833 // Things stored inside of tys
4934 type ErrorGuaranteed : Copy + Debug + Hash + Eq ;
@@ -53,46 +38,24 @@ pub trait Interner: Sized + Copy + IrPrint<TraitRef<Self>> {
5338 type Pat : Copy + Debug + Hash + Eq + DebugWithInfcx < Self > ;
5439
5540 // Kinds of consts
56- type Const : Copy
57- + DebugWithInfcx < Self >
58- + Hash
59- + Eq
60- + Into < Self :: GenericArg >
61- + IntoKind < Kind = ConstKind < Self > >
62- + TypeSuperVisitable < Self >
63- + TypeSuperFoldable < Self >
64- + Flags
65- + Const < Self > ;
41+ type Const : Const < Self > ;
6642 type AliasConst : Copy + DebugWithInfcx < Self > + Hash + Eq ;
67- type PlaceholderConst : Copy + Debug + Hash + Eq + PlaceholderLike ;
43+ type PlaceholderConst : PlaceholderLike ;
6844 type ParamConst : Copy + Debug + Hash + Eq ;
6945 type BoundConst : Copy + Debug + Hash + Eq ;
7046 type ValueConst : Copy + Debug + Hash + Eq ;
7147 type ExprConst : Copy + DebugWithInfcx < Self > + Hash + Eq ;
7248
7349 // Kinds of regions
74- type Region : Copy
75- + DebugWithInfcx < Self >
76- + Hash
77- + Eq
78- + Into < Self :: GenericArg >
79- + IntoKind < Kind = RegionKind < Self > >
80- + Flags
81- + Region < Self > ;
50+ type Region : Region < Self > ;
8251 type EarlyParamRegion : Copy + Debug + Hash + Eq ;
8352 type LateParamRegion : Copy + Debug + Hash + Eq ;
8453 type BoundRegion : Copy + Debug + Hash + Eq ;
8554 type InferRegion : Copy + DebugWithInfcx < Self > + Hash + Eq ;
86- type PlaceholderRegion : Copy + Debug + Hash + Eq + PlaceholderLike ;
55+ type PlaceholderRegion : PlaceholderLike ;
8756
8857 // Predicates
89- type Predicate : Copy
90- + Debug
91- + Hash
92- + Eq
93- + TypeSuperVisitable < Self >
94- + TypeSuperFoldable < Self >
95- + Flags ;
58+ type Predicate : Predicate < Self > ;
9659 type TraitPredicate : Copy + Debug + Hash + Eq ;
9760 type RegionOutlivesPredicate : Copy + Debug + Hash + Eq ;
9861 type TypeOutlivesPredicate : Copy + Debug + Hash + Eq ;
0 commit comments