summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/const_fn_ptr_fail.rs
blob: 1896eba82f2fabe5f1496e4a43d5703f4e95c3f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass
// compile-flags: -Zunleash-the-miri-inside-of-you
#![allow(unused)]

fn double(x: usize) -> usize { x * 2 }
const X: fn(usize) -> usize = double;

const fn bar(x: usize) -> usize {
    X(x) // FIXME: this should error someday
}

fn main() {}