blob: 938f15f12c091a9007dfc0079ca066ffbdadbfd8 [file] [log] [blame] [edit]
#![allow(incomplete_features)]
#![feature(explicit_tail_calls)]
const fn f() {
if false {
become not_const();
//~^ error: cannot call non-const fn `not_const` in constant functions
}
}
const fn g((): ()) {
if false {
become yes_const(not_const());
//~^ error: cannot call non-const fn `not_const` in constant functions
}
}
fn not_const() {}
const fn yes_const((): ()) {}
fn main() {}