Skip to content

Commit

Permalink
Make wording verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Apr 15, 2019
1 parent ae2ed21 commit dce86f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/librustc_mir/transform/qualify_min_const_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,12 @@ fn check_terminator(
abi::Abi::Rust if tcx.is_min_const_fn(def_id) => {},
abi::Abi::Rust => return Err((
span,
"can only call other `const` within a `const`".into(),
format!(
"can only call other `const fn` within a `const fn`, \
but `{:?}` is not stable as `const fn`",
func,
)
.into(),
)),
abi => return Err((
span,
Expand Down

0 comments on commit dce86f9

Please sign in to comment.