@@ -278,7 +278,7 @@ fn program_clauses_that_could_match<I: Interner>(
278
278
match_ty ( builder, environment, ty) ?
279
279
}
280
280
DomainGoal :: FromEnv ( _) => ( ) , // Computed in the environment
281
- DomainGoal :: Normalize ( Normalize { alias, ty } ) => {
281
+ DomainGoal :: Normalize ( Normalize { alias, ty : _ } ) => {
282
282
// Normalize goals derive from `AssociatedTyValue` datums,
283
283
// which are found in impls. That is, if we are
284
284
// normalizing (e.g.) `<T as Iterator>::Item>`, then
@@ -294,25 +294,6 @@ fn program_clauses_that_could_match<I: Interner>(
294
294
let trait_id = associated_ty_datum. trait_id ;
295
295
let trait_parameters = db. trait_parameters_from_projection ( alias) ;
296
296
297
- if let TyData :: Apply ( ApplicationTy {
298
- name : TypeName :: AssociatedType ( _) ,
299
- ..
300
- } ) = ty. data ( interner)
301
- {
302
- // TODO this is probably wrong
303
- // Associated types will never *normalize* to an associated type placeholder.
304
- // It's important that we return early here so that we don't flounder in this case.
305
- return Some ( ( ) ) ;
306
- }
307
-
308
- let trait_datum = builder. db . trait_datum ( trait_id) ;
309
- if trait_datum. is_non_enumerable_trait ( ) || trait_datum. is_auto_trait ( ) {
310
- let self_ty = alias. self_type_parameter ( interner) ;
311
- if self_ty. bound ( interner) . is_some ( ) || self_ty. inference_var ( interner) . is_some ( ) {
312
- return None ;
313
- }
314
- }
315
-
316
297
push_program_clauses_for_associated_type_values_in_impls_of (
317
298
builder,
318
299
trait_id,
0 commit comments