@@ -172,11 +172,6 @@ pub enum PredicateKind<I: Interner> {
172
172
/// Trait must be object-safe.
173
173
ObjectSafe ( I :: DefId ) ,
174
174
175
- /// No direct syntax. May be thought of as `where T: FnFoo<...>`
176
- /// for some generic args `...` and `T` being a closure type.
177
- /// Satisfied (or refuted) once we know the closure's kind.
178
- ClosureKind ( I :: DefId , I :: GenericArgs , I :: ClosureKind ) ,
179
-
180
175
/// `T1 <: T2`
181
176
///
182
177
/// This obligation is created most often when we have two
@@ -226,9 +221,6 @@ impl<I: Interner> PartialEq for PredicateKind<I> {
226
221
match ( self , other) {
227
222
( Self :: Clause ( l0) , Self :: Clause ( r0) ) => l0 == r0,
228
223
( Self :: ObjectSafe ( l0) , Self :: ObjectSafe ( r0) ) => l0 == r0,
229
- ( Self :: ClosureKind ( l0, l1, l2) , Self :: ClosureKind ( r0, r1, r2) ) => {
230
- l0 == r0 && l1 == r1 && l2 == r2
231
- }
232
224
( Self :: Subtype ( l0) , Self :: Subtype ( r0) ) => l0 == r0,
233
225
( Self :: Coerce ( l0) , Self :: Coerce ( r0) ) => l0 == r0,
234
226
( Self :: ConstEquate ( l0, l1) , Self :: ConstEquate ( r0, r1) ) => l0 == r0 && l1 == r1,
@@ -247,12 +239,11 @@ fn predicate_kind_discriminant<I: Interner>(value: &PredicateKind<I>) -> usize {
247
239
match value {
248
240
PredicateKind :: Clause ( _) => 0 ,
249
241
PredicateKind :: ObjectSafe ( _) => 1 ,
250
- PredicateKind :: ClosureKind ( _, _, _) => 2 ,
251
- PredicateKind :: Subtype ( _) => 3 ,
252
- PredicateKind :: Coerce ( _) => 4 ,
253
- PredicateKind :: ConstEquate ( _, _) => 5 ,
254
- PredicateKind :: Ambiguous => 6 ,
255
- PredicateKind :: AliasRelate ( _, _, _) => 7 ,
242
+ PredicateKind :: Subtype ( _) => 2 ,
243
+ PredicateKind :: Coerce ( _) => 3 ,
244
+ PredicateKind :: ConstEquate ( _, _) => 4 ,
245
+ PredicateKind :: Ambiguous => 5 ,
246
+ PredicateKind :: AliasRelate ( _, _, _) => 6 ,
256
247
}
257
248
}
258
249
@@ -273,11 +264,6 @@ where
273
264
match self {
274
265
PredicateKind :: Clause ( p) => p. hash_stable ( hcx, hasher) ,
275
266
PredicateKind :: ObjectSafe ( d) => d. hash_stable ( hcx, hasher) ,
276
- PredicateKind :: ClosureKind ( d, g, k) => {
277
- d. hash_stable ( hcx, hasher) ;
278
- g. hash_stable ( hcx, hasher) ;
279
- k. hash_stable ( hcx, hasher) ;
280
- }
281
267
PredicateKind :: Subtype ( p) => p. hash_stable ( hcx, hasher) ,
282
268
PredicateKind :: Coerce ( p) => p. hash_stable ( hcx, hasher) ,
283
269
PredicateKind :: ConstEquate ( c1, c2) => {
@@ -309,11 +295,6 @@ where
309
295
Ok ( match self {
310
296
PredicateKind :: Clause ( c) => PredicateKind :: Clause ( c. try_fold_with ( folder) ?) ,
311
297
PredicateKind :: ObjectSafe ( d) => PredicateKind :: ObjectSafe ( d. try_fold_with ( folder) ?) ,
312
- PredicateKind :: ClosureKind ( d, g, k) => PredicateKind :: ClosureKind (
313
- d. try_fold_with ( folder) ?,
314
- g. try_fold_with ( folder) ?,
315
- k. try_fold_with ( folder) ?,
316
- ) ,
317
298
PredicateKind :: Subtype ( s) => PredicateKind :: Subtype ( s. try_fold_with ( folder) ?) ,
318
299
PredicateKind :: Coerce ( s) => PredicateKind :: Coerce ( s. try_fold_with ( folder) ?) ,
319
300
PredicateKind :: ConstEquate ( a, b) => {
@@ -344,11 +325,6 @@ where
344
325
match self {
345
326
PredicateKind :: Clause ( p) => p. visit_with ( visitor) ,
346
327
PredicateKind :: ObjectSafe ( d) => d. visit_with ( visitor) ,
347
- PredicateKind :: ClosureKind ( d, g, k) => {
348
- d. visit_with ( visitor) ?;
349
- g. visit_with ( visitor) ?;
350
- k. visit_with ( visitor)
351
- }
352
328
PredicateKind :: Subtype ( s) => s. visit_with ( visitor) ,
353
329
PredicateKind :: Coerce ( s) => s. visit_with ( visitor) ,
354
330
PredicateKind :: ConstEquate ( a, b) => {
@@ -408,9 +384,6 @@ impl<I: Interner> fmt::Debug for PredicateKind<I> {
408
384
PredicateKind :: ObjectSafe ( trait_def_id) => {
409
385
write ! ( f, "ObjectSafe({trait_def_id:?})" )
410
386
}
411
- PredicateKind :: ClosureKind ( closure_def_id, closure_args, kind) => {
412
- write ! ( f, "ClosureKind({closure_def_id:?}, {closure_args:?}, {kind:?})" )
413
- }
414
387
PredicateKind :: ConstEquate ( c1, c2) => write ! ( f, "ConstEquate({c1:?}, {c2:?})" ) ,
415
388
PredicateKind :: Ambiguous => write ! ( f, "Ambiguous" ) ,
416
389
PredicateKind :: AliasRelate ( t1, t2, dir) => {
0 commit comments