]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18652.rs
Sync rustc_codegen_cranelift 'ddd4ce25535cf71203ba3700896131ce55fde795'
[rust.git] / src / test / ui / issues / issue-18652.rs
1 // run-pass
2 // Tests multiple free variables being passed by value into an unboxed
3 // once closure as an optimization by codegen.  This used to hit an
4 // incorrect assert.
5
6 fn main() {
7     let x = 2u8;
8     let y = 3u8;
9     assert_eq!((move || x + y)(), 5);
10 }