]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | // Tests that the trait matching code takes lifetime parameters into account. |
2 | // (Issue #15517.) | |
223e47cc | 3 | |
1a4d82fc JJ |
4 | struct Foo<'a,'b> { |
5 | x: &'a isize, | |
6 | y: &'b isize, | |
223e47cc LB |
7 | } |
8 | ||
1a4d82fc JJ |
9 | trait Tr : Sized { |
10 | fn foo(x: Self) {} | |
223e47cc LB |
11 | } |
12 | ||
1a4d82fc JJ |
13 | impl<'a,'b> Tr for Foo<'a,'b> { |
14 | fn foo(x: Foo<'b,'a>) { | |
15 | //~^ ERROR method not compatible with trait | |
16 | //~^^ ERROR method not compatible with trait | |
17 | } | |
223e47cc LB |
18 | } |
19 | ||
1a4d82fc | 20 | fn main(){} |