mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
15 lines
228 B
Rust
15 lines
228 B
Rust
//@ edition:2018
|
|
|
|
use std::pin::Pin;
|
|
|
|
struct Foo;
|
|
|
|
impl Foo {
|
|
async fn f(self: Pin<&Self>) -> impl Clone { self }
|
|
//~^ ERROR: captures lifetime that does not appear in bounds
|
|
}
|
|
|
|
fn main() {
|
|
{ Pin::new(&Foo).f() };
|
|
}
|