mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-16 16:40:17 +00:00
11 lines
260 B
Rust
11 lines
260 B
Rust
//@ run-pass
|
|
// Tests multiple free variables being passed by value into an unboxed
|
|
// once closure as an optimization by codegen. This used to hit an
|
|
// incorrect assert.
|
|
|
|
fn main() {
|
|
let x = 2u8;
|
|
let y = 3u8;
|
|
assert_eq!((move || x + y)(), 5);
|
|
}
|