File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -235,9 +235,22 @@ fn program_clauses_that_could_match<I: Interner>(
235
235
}
236
236
}
237
237
DomainGoal :: Holds ( WhereClause :: AliasEq ( alias_eq) ) => match & alias_eq. alias {
238
- AliasTy :: Projection ( proj) => db
239
- . associated_ty_data ( proj. associated_ty_id )
240
- . to_program_clauses ( builder) ,
238
+ AliasTy :: Projection ( proj) => {
239
+ let trait_self_ty = db
240
+ . trait_ref_from_projection ( proj)
241
+ . self_type_parameter ( interner) ;
242
+
243
+ if let TyData :: Apply ( ApplicationTy {
244
+ name : TypeName :: OpaqueType ( opaque_ty_id) ,
245
+ ..
246
+ } ) = trait_self_ty. data ( interner)
247
+ {
248
+ db. opaque_ty_data ( * opaque_ty_id) . to_program_clauses ( builder)
249
+ }
250
+
251
+ db. associated_ty_data ( proj. associated_ty_id )
252
+ . to_program_clauses ( builder)
253
+ }
241
254
AliasTy :: Opaque ( opaque_ty) => db
242
255
. opaque_ty_data ( opaque_ty. opaque_ty_id )
243
256
. to_program_clauses ( builder) ,
You can’t perform that action at this time.
0 commit comments