Closed
Description
const fn foo() { panic!() }
fn main() { }
Compiling playground v0.0.1 (/playground)
error: can only call other `min_const_fn` within a `min_const_fn`
--> src/main.rs:1:18
|
1 | const fn foo() { panic!() }
| ^^^^^^^^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
The name min_const_fn
seems meaningless to an end user. It should say something like "only call const
functions within const
functions."