2 #![allow(non_upper_case_globals)]
3 // just to make sure that `return` is only returning from the closure,
4 // not the surrounding function.
6 static mut calls: usize = 0;
9 let return_works = |n: isize| {
19 let return_works_proc = |n: isize| {
26 return_works_proc(10);
32 assert_eq!(unsafe {calls}, 3);