summaryrefslogtreecommitdiffstats
path: root/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs
blob: 4db2fa7dcb81eef2cf602f6c17a0640bca33cfd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use std::pin::Pin;

struct Foo;

impl Foo {
    fn f(self: Pin<&Self>) -> impl Clone { self }
    //~^ ERROR: captures lifetime that does not appear in bounds
}

fn main() {
    { Pin::new(&Foo).f() };
}