]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs
Rollup merge of #63055 - Mark-Simulacrum:save-analysis-clean-2, r=Xanewok
[rust.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_impl_trait.rs
1 // compile-fail
2
3 use std::pin::Pin;
4
5 struct Foo;
6
7 impl Foo {
8     fn f(self: Pin<&Self>) -> impl Clone { self } //~ ERROR cannot infer an appropriate lifetime
9 }
10
11 fn main() {
12     { Pin::new(&Foo).f() };
13 }