Skip to content

Commit dce86f9

Browse files
committed
Make wording verbose
1 parent ae2ed21 commit dce86f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustc_mir/transform/qualify_min_const_fn.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,12 @@ fn check_terminator(
326326
abi::Abi::Rust if tcx.is_min_const_fn(def_id) => {},
327327
abi::Abi::Rust => return Err((
328328
span,
329-
"can only call other `const` within a `const`".into(),
329+
format!(
330+
"can only call other `const fn` within a `const fn`, \
331+
but `{:?}` is not stable as `const fn`",
332+
func,
333+
)
334+
.into(),
330335
)),
331336
abi => return Err((
332337
span,

0 commit comments

Comments
 (0)