Rollup merge of #91815 - RalfJung:span, r=oli-obk

better span for unexpected normalization failure in CTFE engine

No reason to use `DUMMY_SP` here.
This commit is contained in:
Matthias Krüger 2021-12-12 07:45:31 +01:00 committed by GitHub
commit 6d9d8de029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ use rustc_middle::ty::{
use rustc_mir_dataflow::storage::AlwaysLiveLocals;
use rustc_query_system::ich::StableHashingContext;
use rustc_session::Limit;
use rustc_span::{Pos, Span, DUMMY_SP};
use rustc_span::{Pos, Span};
use rustc_target::abi::{Align, HasDataLayout, Size, TargetDataLayout};
use super::{
@ -525,7 +525,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
.try_subst_mir_and_normalize_erasing_regions(*self.tcx, self.param_env, value)
.or_else(|e| {
self.tcx.sess.delay_span_bug(
DUMMY_SP,
self.cur_span(),
format!("failed to normalize {}", e.get_type_for_failure()).as_str(),
);