cleanup and dedupe CTFE and Miri error reporting
This commit is contained in:
parent
03e3cc5b77
commit
2d0c41a9a3
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ pub(crate) fn check_constants(fx: &mut FunctionCx<'_, '_, '_>) -> bool {
|
||||||
if let Err(err) = fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), unevaluated, None) {
|
if let Err(err) = fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), unevaluated, None) {
|
||||||
all_constants_ok = false;
|
all_constants_ok = false;
|
||||||
match err {
|
match err {
|
||||||
ErrorHandled::Reported(_) | ErrorHandled::Linted => {
|
ErrorHandled::Reported(_) => {
|
||||||
fx.tcx.sess.span_err(constant.span, "erroneous constant encountered");
|
fx.tcx.sess.span_err(constant.span, "erroneous constant encountered");
|
||||||
}
|
}
|
||||||
ErrorHandled::TooGeneric => {
|
ErrorHandled::TooGeneric => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue