mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 02:27:39 +03:00
14 lines
248 B
Rust
14 lines
248 B
Rust
#![allow(incomplete_features)]
|
|
#![feature(move_expr)]
|
|
|
|
fn main() {
|
|
let x = vec![1, 2, 3];
|
|
let _c = || {
|
|
let y = move(x);
|
|
let z = move(x);
|
|
//~^ ERROR use of moved value: `x`
|
|
drop(y);
|
|
drop(z);
|
|
};
|
|
}
|