]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[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 } //~ ERROR E0759
7 }
8
9 fn main() {
10     { Pin::new(&Foo).f() };
11 }