1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
const fn make_fn_ptr() -> fn() { || {} } static STAT: () = make_fn_ptr()(); //~^ ERROR function pointer const CONST: () = make_fn_ptr()(); //~^ ERROR function pointer const fn call_ptr() { make_fn_ptr()(); //~^ ERROR function pointer } fn main() {}