rust/tests/ui/closures/issue-5239-2.rs
2024-04-21 15:43:43 -03:00

9 lines
151 B
Rust

//@ run-pass
// Regression test for issue #5239
pub fn main() {
let _f = |ref x: isize| { *x };
let foo = 10;
assert_eq!(_f(foo), 10);
}