summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-fn-ptr.rs
blob: b1befdf06af2ea1c45e865bb38654b710f532b83 (plain)
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() {}