File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -267,30 +267,38 @@ fn inductive_canonical_cycle() {
267267 program {
268268 trait Trait <T , U > { }
269269
270+ trait IsNotU32 { }
271+ impl IsNotU32 for i32 { }
272+ impl IsNotU32 for i16 { }
273+
270274 impl <T , U > Trait <T , U > for ( )
271275 where
272276 ( ) : Trait <U , T >,
273- T : OtherTrait ,
277+ T : IsNotU32 ,
274278 { }
279+ impl <T > Trait <u32 , T > for ( ) { }
280+ }
275281
276- trait OtherTrait { }
277- impl OtherTrait for u32 { }
282+ goal {
283+ ( ) : Trait <i32 , u32 >
284+ } yields {
285+ expect![ [ "Unique" ] ]
278286 }
279287
280288 goal {
281- ( ) : Trait <u32 , u32 >
289+ ( ) : Trait <u32 , i32 >
282290 } yields {
283- // FIXME: Should be unique
284- expect![ [ "No possible solution" ] ]
291+ expect![ [ "Unique" ] ]
285292 }
286293
287294 goal {
288295 exists<T , U > {
289296 ( ) : Trait <T , U >
290297 }
291- } yields {
292- // FIXME: Should be unique
293- expect![ [ "No possible solution" ] ]
298+ } yields[ SolverChoice :: slg( 10 , None ) ] {
299+ expect![ [ "Ambiguous; no inference guidance" ] ]
300+ } yields[ SolverChoice :: recursive_default( ) ] {
301+ expect![ [ "Ambiguous; no inference guidance" ] ]
294302 }
295303 }
296304}
You can’t perform that action at this time.
0 commit comments