blob: e390b869ca7b70284fc4abb291ac52c50df5a3d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use std::pin::Pin;
trait Trait {
fn method<'a>(self: Pin<&Self>, f: &'a u32) -> &'a u32 {
f
}
}
impl<P> Trait for Pin<P> {
// This should not hide `&Self`, which would cause this to compile.
fn method(self: Pin<&Self>, f: &u32) -> &u32 {
//~^ ERROR `impl` item signature doesn't match `trait`
f
//~^ ERROR lifetime may not live long enough
}
}
fn main() {}
|