mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
13 lines
232 B
Rust
13 lines
232 B
Rust
#![allow(incomplete_features)]
|
|
#![feature(move_expr)]
|
|
|
|
fn main() {
|
|
let x = vec![1, 2, 3];
|
|
let _c = || {
|
|
//~^ ERROR borrow of moved value: `x`
|
|
let y = move(x);
|
|
println!("{x:?}");
|
|
drop(y);
|
|
};
|
|
}
|