Make wording verbose

This commit is contained in:
Yuki OKUSHI 2019-04-16 07:32:19 +09:00
parent ae2ed2182b
commit dce86f9dd5

View file

@ -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,