]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-fn-ptr.rs
suggest fix for attempted integer identifier in patterns
[rust.git] / tests / ui / consts / const-fn-ptr.rs
1 const fn make_fn_ptr() -> fn() {
2     || {}
3 }
4
5 static STAT: () = make_fn_ptr()();
6 //~^ ERROR function pointer
7
8 const CONST: () = make_fn_ptr()();
9 //~^ ERROR function pointer
10
11 const fn call_ptr() {
12     make_fn_ptr()();
13     //~^ ERROR function pointer
14 }
15
16 fn main() {}