mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
16 lines
211 B
Rust
16 lines
211 B
Rust
|
#![allow(dead_code, incomplete_features)]
|
||
|
|
||
|
use std::pin::Pin;
|
||
|
|
||
|
struct Foo;
|
||
|
|
||
|
fn foo(_: Pin<&mut Foo>) {
|
||
|
}
|
||
|
|
||
|
fn bar(mut x: Pin<&mut Foo>) {
|
||
|
foo(x);
|
||
|
foo(x); //~ ERROR use of moved value: `x`
|
||
|
}
|
||
|
|
||
|
fn main() {}
|