File tree 2 files changed +18
-6
lines changed
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>(
304
304
. trait_ref_from_projection ( proj)
305
305
. self_type_parameter ( interner) ;
306
306
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
+ _ => { }
313
316
}
314
317
315
318
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() {
96
96
"Unique; substitution []"
97
97
}
98
98
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
+ }
99
108
}
100
109
}
101
110
You can’t perform that action at this time.
0 commit comments