mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 16:45:37 +00:00
21 lines
388 B
Rust
21 lines
388 B
Rust
// Tests that the trait matching code takes lifetime parameters into account.
|
|
// (Issue #15517.)
|
|
|
|
struct Foo<'a,'b> {
|
|
x: &'a isize,
|
|
y: &'b isize,
|
|
}
|
|
|
|
trait Tr : Sized {
|
|
fn foo(x: Self) {}
|
|
}
|
|
|
|
impl<'a,'b> Tr for Foo<'a,'b> {
|
|
fn foo(x: Foo<'b,'a>) {
|
|
//~^ ERROR method not compatible with trait
|
|
//~^^ ERROR method not compatible with trait
|
|
}
|
|
}
|
|
|
|
fn main(){}
|