]> git.lizzy.rs Git - rust.git/blob - tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / self / arbitrary_self_types_pin_lifetime_impl_trait.rs
1 use std::pin::Pin;
2
3 struct Foo;
4
5 impl Foo {
6     fn f(self: Pin<&Self>) -> impl Clone { self }
7     //~^ ERROR: captures lifetime that does not appear in bounds
8 }
9
10 fn main() {
11     { Pin::new(&Foo).f() };
12 }