]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/const_fn_ptr_fail.rs
Auto merge of #81132 - bugadani:map-prealloc, r=matthewjasper
[rust.git] / src / test / ui / consts / const-eval / const_fn_ptr_fail.rs
1 // run-pass
2 // compile-flags: -Zunleash-the-miri-inside-of-you
3 #![feature(const_fn)]
4 #![allow(unused)]
5
6 fn double(x: usize) -> usize { x * 2 }
7 const X: fn(usize) -> usize = double;
8
9 const fn bar(x: usize) -> usize {
10     X(x) // FIXME: this should error someday
11 }
12
13 fn main() {}