Make wording verbose
This commit is contained in:
parent
ae2ed2182b
commit
dce86f9dd5
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user