2024-02-16 14:02:50 -06:00
|
|
|
//@ run-rustfix
|
2022-12-23 11:59:39 -06:00
|
|
|
use std::pin::Pin;
|
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn foo(self: Pin<&mut Self>) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut foo = Foo;
|
|
|
|
let mut foo = Pin::new(&mut foo);
|
|
|
|
foo.foo();
|
|
|
|
foo.foo(); //~ ERROR use of moved value
|
|
|
|
}
|