blob: 70da94df7a2653a2d4acc6949b21dc13dc370ba9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// compile-flags: -Zunleash-the-miri-inside-of-you
#![allow(const_err)]
// A test demonstrating that we prevent calling non-const fn during CTFE.
fn foo() {}
static C: () = foo();
//~^ ERROR could not evaluate static initializer
//~| NOTE calling non-const function `foo`
fn main() {}
|