1 // compile-flags: -Z 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 only_foo(x); //~ ERROR mismatched types
23 // Here we have two solutions so we get back the behavior of the old-style
25 only_bar(x); //~ ERROR the trait bound `{float}: Bar` is not satisfied