@@ -2,23 +2,17 @@ use smallvec::SmallVec;
2
2
use std:: fmt:: Debug ;
3
3
use std:: hash:: Hash ;
4
4
5
- use crate :: fold:: TypeSuperFoldable ;
6
5
use crate :: inherent:: * ;
7
6
use crate :: ir_print:: IrPrint ;
8
7
use crate :: visit:: { Flags , TypeSuperVisitable , TypeVisitable } ;
9
- use crate :: { CanonicalVarInfo , ConstKind , DebugWithInfcx , RegionKind , TraitRef , TyKind } ;
8
+ use crate :: { CanonicalVarInfo , DebugWithInfcx , TraitRef } ;
10
9
11
10
pub trait Interner : Sized + Copy + IrPrint < TraitRef < Self > > {
12
11
type DefId : Copy + Debug + Hash + Eq ;
13
12
type DefiningOpaqueTypes : Copy + Debug + Hash + Default + Eq + TypeVisitable < Self > ;
14
13
type AdtDef : Copy + Debug + Hash + Eq ;
15
14
16
- type GenericArgs : Copy
17
- + DebugWithInfcx < Self >
18
- + Hash
19
- + Eq
20
- + IntoIterator < Item = Self :: GenericArg >
21
- + GenericArgs < Self > ;
15
+ type GenericArgs : GenericArgs < Self > ;
22
16
type GenericArg : Copy + DebugWithInfcx < Self > + Hash + Eq ;
23
17
type Term : Copy + Debug + Hash + Eq ;
24
18
@@ -29,21 +23,12 @@ pub trait Interner: Sized + Copy + IrPrint<TraitRef<Self>> {
29
23
type CanonicalVars : Copy + Debug + Hash + Eq + IntoIterator < Item = CanonicalVarInfo < Self > > ;
30
24
31
25
// 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 > ;
42
27
type Tys : Copy + Debug + Hash + Eq + IntoIterator < Item = Self :: Ty > ;
43
28
type AliasTy : Copy + DebugWithInfcx < Self > + Hash + Eq ;
44
29
type ParamTy : Copy + Debug + Hash + Eq ;
45
30
type BoundTy : Copy + Debug + Hash + Eq ;
46
- type PlaceholderTy : Copy + Debug + Hash + Eq + PlaceholderLike ;
31
+ type PlaceholderTy : PlaceholderLike ;
47
32
48
33
// Things stored inside of tys
49
34
type ErrorGuaranteed : Copy + Debug + Hash + Eq ;
@@ -53,46 +38,24 @@ pub trait Interner: Sized + Copy + IrPrint<TraitRef<Self>> {
53
38
type Pat : Copy + Debug + Hash + Eq + DebugWithInfcx < Self > ;
54
39
55
40
// 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 > ;
66
42
type AliasConst : Copy + DebugWithInfcx < Self > + Hash + Eq ;
67
- type PlaceholderConst : Copy + Debug + Hash + Eq + PlaceholderLike ;
43
+ type PlaceholderConst : PlaceholderLike ;
68
44
type ParamConst : Copy + Debug + Hash + Eq ;
69
45
type BoundConst : Copy + Debug + Hash + Eq ;
70
46
type ValueConst : Copy + Debug + Hash + Eq ;
71
47
type ExprConst : Copy + DebugWithInfcx < Self > + Hash + Eq ;
72
48
73
49
// 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 > ;
82
51
type EarlyParamRegion : Copy + Debug + Hash + Eq ;
83
52
type LateParamRegion : Copy + Debug + Hash + Eq ;
84
53
type BoundRegion : Copy + Debug + Hash + Eq ;
85
54
type InferRegion : Copy + DebugWithInfcx < Self > + Hash + Eq ;
86
- type PlaceholderRegion : Copy + Debug + Hash + Eq + PlaceholderLike ;
55
+ type PlaceholderRegion : PlaceholderLike ;
87
56
88
57
// Predicates
89
- type Predicate : Copy
90
- + Debug
91
- + Hash
92
- + Eq
93
- + TypeSuperVisitable < Self >
94
- + TypeSuperFoldable < Self >
95
- + Flags ;
58
+ type Predicate : Predicate < Self > ;
96
59
type TraitPredicate : Copy + Debug + Hash + Eq ;
97
60
type RegionOutlivesPredicate : Copy + Debug + Hash + Eq ;
98
61
type TypeOutlivesPredicate : Copy + Debug + Hash + Eq ;
0 commit comments