Files
rust/tests/ui/move-expr/capture-reference.rs
T
2026-05-07 22:23:37 +09:00

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();
}