Sign in
rust
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
consts
/
miri_unleashed
/
non_const_fn.rs
blob: 18bee124db44254a580173c3bbcb23895c5d7d59 [
file
] [
log
] [
blame
] [
edit
]
//@ compile-flags: -Zunleash-the-miri-inside-of-you
// A test demonstrating that we prevent calling non-const fn during CTFE.
fn
foo
()
{}
static
C
:
()
=
foo
();
//~^ ERROR calling non-const function `foo`
fn
main
()
{}
//~? WARN skipping const checks