1 // compile-flags: -Z trait-solver=chalk
10 fn only_foo<T: Foo>(_x: T) { }
12 fn only_bar<T: Bar>(_x: T) { }
17 // The only type which implements `Foo` is `i32`, so the chalk trait solver
18 // is expecting a variable of type `i32`. This behavior differs from the
19 // old-style trait solver. I guess this will change, that's why I'm
21 // FIXME(chalk): order of these two errors is non-deterministic,
22 // so let's just hide one for now
23 //only_foo(x); // ERROR the trait bound `f64: Foo` is not satisfied
25 // Here we have two solutions so we get back the behavior of the old-style
27 only_bar(x); //~ ERROR the trait bound `{float}: Bar` is not satisfied