summary refs log tree commit diff
path: root/src/test/ui/issues/issue-21974.rs
blob: 0cbe38d6ec0b6b4b4d18a65a4b19c5fb990943e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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);
}

fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations needed
    where &'a T : Foo,
          &'b T : Foo
{
    x.foo();
    y.foo();
}

fn main() { }