2019-10-19 06:13:31 -05:00
|
|
|
// compile-flags: -Zunleash-the-miri-inside-of-you
|
2019-12-13 21:28:32 -06:00
|
|
|
|
2019-10-19 06:13:31 -05:00
|
|
|
// A test demonstrating that we prevent calling non-const fn during CTFE.
|
|
|
|
|
|
|
|
fn foo() {}
|
|
|
|
|
2020-05-03 07:23:08 -05:00
|
|
|
static C: () = foo();
|
2020-04-19 05:32:21 -05:00
|
|
|
//~^ ERROR could not evaluate static initializer
|
|
|
|
//~| NOTE calling non-const function `foo`
|
2019-10-19 06:13:31 -05:00
|
|
|
|
2020-04-19 05:32:21 -05:00
|
|
|
fn main() {}
|