mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 05:00:17 +00:00
16 lines
242 B
Plaintext
16 lines
242 B
Plaintext
//@ run-rustfix
|
|
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.as_mut().foo();
|
|
foo.foo(); //~ ERROR use of moved value
|
|
}
|