Skip to content

Commit

Permalink
better span for unexpected normalization failure in CTFE engine
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 11, 2021
1 parent 928783d commit 3de6026
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_const_eval/src/interpret/eval_context.rs
Expand Up @@ -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::{
Expand Down Expand Up @@ -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(),
);

Expand Down

0 comments on commit 3de6026

Please sign in to comment.