2015-02-05 21:24:12 +00: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-30 00:55:37 +00:00
|
|
|
fn foo<'a,'b,T>(x: &'a T, y: &'b T)
|
|
|
|
where &'a T : Foo, //~ ERROR type annotations needed
|
2015-02-05 21:24:12 +00:00
|
|
|
&'b T : Foo
|
|
|
|
{
|
2024-02-09 12:17:55 +00:00
|
|
|
x.foo(); //~ ERROR type annotations needed
|
2015-02-05 21:24:12 +00:00
|
|
|
y.foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|