]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / 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 }