fix ICE on type error in promoted
This commit is contained in:
@@ -8,6 +8,7 @@ use rustc_data_structures::fx::{FxHashMap, FxIndexMap, IndexEntry};
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_hir::{self as hir, CRATE_HIR_ID, LangItem};
|
||||
use rustc_middle::mir::AssertMessage;
|
||||
use rustc_middle::mir::interpret::ReportedErrorInfo;
|
||||
use rustc_middle::query::TyCtxtAt;
|
||||
use rustc_middle::ty::layout::{HasTypingEnv, TyAndLayout};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
@@ -563,7 +564,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
|
||||
.tcx
|
||||
.dcx()
|
||||
.span_delayed_bug(span, "The deny lint should have already errored");
|
||||
throw_inval!(AlreadyReported(guard.into()));
|
||||
throw_inval!(AlreadyReported(ReportedErrorInfo::allowed_in_infallible(guard)));
|
||||
}
|
||||
} else if new_steps > start && new_steps.is_power_of_two() {
|
||||
// Only report after a certain number of terminators have been evaluated and the
|
||||
|
||||
Reference in New Issue
Block a user