File tree 1 file changed +17
-9
lines changed 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() {
267
267
program {
268
268
trait Trait <T , U > { }
269
269
270
+ trait IsNotU32 { }
271
+ impl IsNotU32 for i32 { }
272
+ impl IsNotU32 for i16 { }
273
+
270
274
impl <T , U > Trait <T , U > for ( )
271
275
where
272
276
( ) : Trait <U , T >,
273
- T : OtherTrait ,
277
+ T : IsNotU32 ,
274
278
{ }
279
+ impl <T > Trait <u32 , T > for ( ) { }
280
+ }
275
281
276
- trait OtherTrait { }
277
- impl OtherTrait for u32 { }
282
+ goal {
283
+ ( ) : Trait <i32 , u32 >
284
+ } yields {
285
+ expect![ [ "Unique" ] ]
278
286
}
279
287
280
288
goal {
281
- ( ) : Trait <u32 , u32 >
289
+ ( ) : Trait <u32 , i32 >
282
290
} yields {
283
- // FIXME: Should be unique
284
- expect![ [ "No possible solution" ] ]
291
+ expect![ [ "Unique" ] ]
285
292
}
286
293
287
294
goal {
288
295
exists<T , U > {
289
296
( ) : Trait <T , U >
290
297
}
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" ] ]
294
302
}
295
303
}
296
304
}
You can’t perform that action at this time.
0 commit comments