2024-09-04 18:03:47 -05:00
|
|
|
#![allow(dead_code, incomplete_features)]
|
|
|
|
|
|
|
|
use std::pin::Pin;
|
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
|
2024-09-19 21:35:01 -05:00
|
|
|
impl Foo {
|
|
|
|
fn foo(self: Pin<&mut Self>) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-04 18:03:47 -05:00
|
|
|
fn foo(_: Pin<&mut Foo>) {
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar(mut x: Pin<&mut Foo>) {
|
|
|
|
foo(x);
|
|
|
|
foo(x); //~ ERROR use of moved value: `x`
|
2024-10-01 14:44:10 -05:00
|
|
|
}
|
2024-09-19 21:35:01 -05:00
|
|
|
|
2024-10-01 14:44:10 -05:00
|
|
|
fn baz(mut x: Pin<&mut Foo>) {
|
|
|
|
x.foo();
|
2024-09-19 21:35:01 -05:00
|
|
|
x.foo(); //~ ERROR use of moved value: `x`
|
2024-09-04 18:03:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|