mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
16 lines
257 B
Rust
16 lines
257 B
Rust
#![allow(incomplete_features)]
|
|
#![feature(move_expr)]
|
|
|
|
fn main() {
|
|
let c = {
|
|
let x = 22;
|
|
|| {
|
|
let y = move(&x);
|
|
//~^ ERROR `x` does not live long enough
|
|
println!("{y:?}");
|
|
}
|
|
};
|
|
|
|
c();
|
|
}
|