You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Weird error message for non-const const fns #59611
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."
Activity
Rollup merge of rust-lang#59646 - JohnTitor:improve-wording, r=oli-obk