2 // pretty-expanded FIXME #23616
3 #![allow(non_upper_case_globals)]
6 * Try to double-check that static fns have the right size (with or
7 * without dummy env ptr, as appropriate) by iterating a size-2 array.
8 * If the static size differs from the runtime size, the second element
9 * should be read as a null or otherwise wrong pointer and crash.
13 static bare_fns: &'static [fn()] = &[f, f];
14 struct S<F: FnOnce()>(F);
15 static mut closures: &'static mut [S<fn()>] = &mut [S(f as fn()), S(f as fn())];
19 for &bare_fn in bare_fns { bare_fn() }
20 for closure in &mut *closures {
21 let S(ref mut closure) = *closure;