2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2014-11-06 22:44:08 -06:00
|
|
|
// Tests multiple free variables being passed by value into an unboxed
|
2018-05-08 08:10:16 -05:00
|
|
|
// once closure as an optimization by codegen. This used to hit an
|
2014-11-06 22:44:08 -06:00
|
|
|
// incorrect assert.
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = 2u8;
|
|
|
|
let y = 3u8;
|
2015-02-01 11:44:15 -06:00
|
|
|
assert_eq!((move || x + y)(), 5);
|
2014-11-06 22:44:08 -06:00
|
|
|
}
|