2 // Test that we can infer the "kind" of an unboxed closure based on
5 // Test by-ref capture of environment in unboxed closure types
7 fn call_fn<F: Fn()>(f: F) {
11 fn call_fn_mut<F: FnMut()>(mut f: F) {
15 fn call_fn_once<F: FnOnce()>(f: F) {
23 call_fn(|| assert_eq!(x, 0));
24 call_fn_mut(|| x += y);
25 call_fn_once(|| x += y);