2 // compile-flags: -Zunleash-the-miri-inside-of-you
7 fn double(x: usize) -> usize {
10 const X: fn(usize) -> usize = double;
12 const fn bar(x: fn(usize) -> usize, y: usize) -> usize {
16 const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
17 const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
21 //~^ ERROR evaluation of constant value failed
23 //~^ ERROR evaluation of constant value failed