@@ -129,11 +129,6 @@ pub enum PredicateKind<I: Interner> {
129
129
/// Trait must be object-safe.
130
130
ObjectSafe ( I :: DefId ) ,
131
131
132
- /// No direct syntax. May be thought of as `where T: FnFoo<...>`
133
- /// for some generic args `...` and `T` being a closure type.
134
- /// Satisfied (or refuted) once we know the closure's kind.
135
- ClosureKind ( I :: DefId , I :: GenericArgs , I :: ClosureKind ) ,
136
-
137
132
/// `T1 <: T2`
138
133
///
139
134
/// This obligation is created most often when we have two
@@ -173,7 +168,6 @@ where
173
168
I :: Term : Copy ,
174
169
I :: CoercePredicate : Copy ,
175
170
I :: SubtypePredicate : Copy ,
176
- I :: ClosureKind : Copy ,
177
171
ClauseKind < I > : Copy ,
178
172
{
179
173
}
@@ -183,9 +177,6 @@ impl<I: Interner> PartialEq for PredicateKind<I> {
183
177
match ( self , other) {
184
178
( Self :: Clause ( l0) , Self :: Clause ( r0) ) => l0 == r0,
185
179
( Self :: ObjectSafe ( l0) , Self :: ObjectSafe ( r0) ) => l0 == r0,
186
- ( Self :: ClosureKind ( l0, l1, l2) , Self :: ClosureKind ( r0, r1, r2) ) => {
187
- l0 == r0 && l1 == r1 && l2 == r2
188
- }
189
180
( Self :: Subtype ( l0) , Self :: Subtype ( r0) ) => l0 == r0,
190
181
( Self :: Coerce ( l0) , Self :: Coerce ( r0) ) => l0 == r0,
191
182
( Self :: ConstEquate ( l0, l1) , Self :: ConstEquate ( r0, r1) ) => l0 == r0 && l1 == r1,
@@ -207,18 +198,12 @@ where
207
198
I :: Term : TypeFoldable < I > ,
208
199
I :: CoercePredicate : TypeFoldable < I > ,
209
200
I :: SubtypePredicate : TypeFoldable < I > ,
210
- I :: ClosureKind : TypeFoldable < I > ,
211
201
ClauseKind < I > : TypeFoldable < I > ,
212
202
{
213
203
fn try_fold_with < F : FallibleTypeFolder < I > > ( self , folder : & mut F ) -> Result < Self , F :: Error > {
214
204
Ok ( match self {
215
205
PredicateKind :: Clause ( c) => PredicateKind :: Clause ( c. try_fold_with ( folder) ?) ,
216
206
PredicateKind :: ObjectSafe ( d) => PredicateKind :: ObjectSafe ( d. try_fold_with ( folder) ?) ,
217
- PredicateKind :: ClosureKind ( d, g, k) => PredicateKind :: ClosureKind (
218
- d. try_fold_with ( folder) ?,
219
- g. try_fold_with ( folder) ?,
220
- k. try_fold_with ( folder) ?,
221
- ) ,
222
207
PredicateKind :: Subtype ( s) => PredicateKind :: Subtype ( s. try_fold_with ( folder) ?) ,
223
208
PredicateKind :: Coerce ( s) => PredicateKind :: Coerce ( s. try_fold_with ( folder) ?) ,
224
209
PredicateKind :: ConstEquate ( a, b) => {
@@ -242,18 +227,12 @@ where
242
227
I :: Term : TypeVisitable < I > ,
243
228
I :: CoercePredicate : TypeVisitable < I > ,
244
229
I :: SubtypePredicate : TypeVisitable < I > ,
245
- I :: ClosureKind : TypeVisitable < I > ,
246
230
ClauseKind < I > : TypeVisitable < I > ,
247
231
{
248
232
fn visit_with < V : TypeVisitor < I > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
249
233
match self {
250
234
PredicateKind :: Clause ( p) => p. visit_with ( visitor) ,
251
235
PredicateKind :: ObjectSafe ( d) => d. visit_with ( visitor) ,
252
- PredicateKind :: ClosureKind ( d, g, k) => {
253
- d. visit_with ( visitor) ?;
254
- g. visit_with ( visitor) ?;
255
- k. visit_with ( visitor)
256
- }
257
236
PredicateKind :: Subtype ( s) => s. visit_with ( visitor) ,
258
237
PredicateKind :: Coerce ( s) => s. visit_with ( visitor) ,
259
238
PredicateKind :: ConstEquate ( a, b) => {
@@ -313,9 +292,6 @@ impl<I: Interner> fmt::Debug for PredicateKind<I> {
313
292
PredicateKind :: ObjectSafe ( trait_def_id) => {
314
293
write ! ( f, "ObjectSafe({trait_def_id:?})" )
315
294
}
316
- PredicateKind :: ClosureKind ( closure_def_id, closure_args, kind) => {
317
- write ! ( f, "ClosureKind({closure_def_id:?}, {closure_args:?}, {kind:?})" )
318
- }
319
295
PredicateKind :: ConstEquate ( c1, c2) => write ! ( f, "ConstEquate({c1:?}, {c2:?})" ) ,
320
296
PredicateKind :: Ambiguous => write ! ( f, "Ambiguous" ) ,
321
297
PredicateKind :: AliasRelate ( t1, t2, dir) => {
0 commit comments