File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -304,12 +304,15 @@ fn program_clauses_that_could_match<I: Interner>(
304304 . trait_ref_from_projection ( proj)
305305 . self_type_parameter ( interner) ;
306306
307- if let TyData :: Apply ( ApplicationTy {
308- name : TypeName :: OpaqueType ( opaque_ty_id) ,
309- ..
310- } ) = trait_self_ty. data ( interner)
311- {
312- db. opaque_ty_data ( * opaque_ty_id) . to_program_clauses ( builder)
307+ match trait_self_ty. data ( interner) {
308+ TyData :: Apply ( ApplicationTy {
309+ name : TypeName :: OpaqueType ( opaque_ty_id) ,
310+ ..
311+ } )
312+ | TyData :: Alias ( AliasTy :: Opaque ( OpaqueTy { opaque_ty_id, .. } ) ) => {
313+ db. opaque_ty_data ( * opaque_ty_id) . to_program_clauses ( builder) ;
314+ }
315+ _ => { }
313316 }
314317
315318 db. associated_ty_data ( proj. associated_ty_id )
Original file line number Diff line number Diff line change @@ -96,6 +96,15 @@ fn opaque_generics() {
9696 "Unique; substitution []"
9797 }
9898
99+ goal {
100+ exists<T > {
101+ <Foo <Bar > as Iterator >:: Item = T
102+ }
103+ } yields[ SolverChoice :: slg_default( ) ] {
104+ "Ambiguous" // #234
105+ } yields[ SolverChoice :: recursive( ) ] {
106+ "Unique; substitution [?0 := Bar], lifetime constraints []"
107+ }
99108 }
100109}
101110
You can’t perform that action at this time.
0 commit comments