@@ -33,28 +33,21 @@ pub enum TypeError<'tcx> {
33
33
UnsafetyMismatch ( ExpectedFound < hir:: Unsafety > ) ,
34
34
AbiMismatch ( ExpectedFound < abi:: Abi > ) ,
35
35
Mutability ,
36
- BoxMutability ,
37
- PtrMutability ,
38
- RefMutability ,
39
- VecMutability ,
40
36
TupleSize ( ExpectedFound < usize > ) ,
41
37
FixedArraySize ( ExpectedFound < usize > ) ,
42
- TyParamSize ( ExpectedFound < usize > ) ,
43
38
ArgCount ,
44
39
RegionsDoesNotOutlive ( & ' tcx Region , & ' tcx Region ) ,
45
40
RegionsNotSame ( & ' tcx Region , & ' tcx Region ) ,
46
41
RegionsNoOverlap ( & ' tcx Region , & ' tcx Region ) ,
47
42
RegionsInsufficientlyPolymorphic ( BoundRegion , & ' tcx Region ) ,
48
43
RegionsOverlyPolymorphic ( BoundRegion , & ' tcx Region ) ,
49
44
Sorts ( ExpectedFound < Ty < ' tcx > > ) ,
50
- IntegerAsChar ,
51
45
IntMismatch ( ExpectedFound < ty:: IntVarValue > ) ,
52
46
FloatMismatch ( ExpectedFound < ast:: FloatTy > ) ,
53
47
Traits ( ExpectedFound < DefId > ) ,
54
48
BuiltinBoundsMismatch ( ExpectedFound < ty:: BuiltinBounds > ) ,
55
49
VariadicMismatch ( ExpectedFound < bool > ) ,
56
50
CyclicTy ,
57
- ConvergenceMismatch ( ExpectedFound < bool > ) ,
58
51
ProjectionNameMismatched ( ExpectedFound < Name > ) ,
59
52
ProjectionBoundsLength ( ExpectedFound < usize > ) ,
60
53
TyParamDefaultMismatch ( ExpectedFound < type_variable:: Default < ' tcx > > )
@@ -99,18 +92,6 @@ impl<'tcx> fmt::Display for TypeError<'tcx> {
99
92
values. found)
100
93
}
101
94
Mutability => write ! ( f, "types differ in mutability" ) ,
102
- BoxMutability => {
103
- write ! ( f, "boxed types differ in mutability" )
104
- }
105
- VecMutability => write ! ( f, "vectors differ in mutability" ) ,
106
- PtrMutability => write ! ( f, "pointers differ in mutability" ) ,
107
- RefMutability => write ! ( f, "references differ in mutability" ) ,
108
- TyParamSize ( values) => {
109
- write ! ( f, "expected a type with {} type params, \
110
- found one with {} type params",
111
- values. expected,
112
- values. found)
113
- }
114
95
FixedArraySize ( values) => {
115
96
write ! ( f, "expected an array with a fixed size of {} elements, \
116
97
found one with {} elements",
@@ -167,9 +148,6 @@ impl<'tcx> fmt::Display for TypeError<'tcx> {
167
148
values. found)
168
149
}
169
150
}
170
- IntegerAsChar => {
171
- write ! ( f, "expected an integral type, found `char`" )
172
- }
173
151
IntMismatch ( ref values) => {
174
152
write ! ( f, "expected `{:?}`, found `{:?}`" ,
175
153
values. expected,
@@ -185,11 +163,6 @@ impl<'tcx> fmt::Display for TypeError<'tcx> {
185
163
if values. expected { "variadic" } else { "non-variadic" } ,
186
164
if values. found { "variadic" } else { "non-variadic" } )
187
165
}
188
- ConvergenceMismatch ( ref values) => {
189
- write ! ( f, "expected {} fn, found {} function" ,
190
- if values. expected { "converging" } else { "diverging" } ,
191
- if values. found { "converging" } else { "diverging" } )
192
- }
193
166
ProjectionNameMismatched ( ref values) => {
194
167
write ! ( f, "expected {}, found {}" ,
195
168
values. expected,
0 commit comments