2015-02-05 15:24:12 -06:00
|
|
|
// Test that (for now) we report an ambiguity error here, because
|
|
|
|
// specific trait relationships are ignored for the purposes of trait
|
|
|
|
// matching. This behavior should likely be improved such that this
|
|
|
|
// test passes. See #21974 for more details.
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn foo(self);
|
|
|
|
}
|
|
|
|
|
2020-01-29 18:55:37 -06:00
|
|
|
fn foo<'a,'b,T>(x: &'a T, y: &'b T)
|
|
|
|
where &'a T : Foo, //~ ERROR type annotations needed
|
2015-02-05 15:24:12 -06:00
|
|
|
&'b T : Foo
|
|
|
|
{
|
2015-12-15 03:31:58 -06:00
|
|
|
x.foo();
|
2015-02-05 15:24:12 -06:00
|
|
|
y.foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|