Sign in
rust
/
rust-lang
/
rust
/
refs/heads/stable
/
.
/
tests
/
ui
/
unboxed-closures
/
issue-18652.rs
blob: df233b3cc2b35edb4ff29ce72d7cc5cf9f2f70bf [
file
] [
log
] [
blame
]
//@ 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
);
}