Skip to content

Commit 3de6026

Browse files
committed
better span for unexpected normalization failure in CTFE engine
1 parent 928783d commit 3de6026

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_const_eval/src/interpret/eval_context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rustc_middle::ty::{
1515
use rustc_mir_dataflow::storage::AlwaysLiveLocals;
1616
use rustc_query_system::ich::StableHashingContext;
1717
use rustc_session::Limit;
18-
use rustc_span::{Pos, Span, DUMMY_SP};
18+
use rustc_span::{Pos, Span};
1919
use rustc_target::abi::{Align, HasDataLayout, Size, TargetDataLayout};
2020

2121
use super::{
@@ -525,7 +525,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
525525
.try_subst_mir_and_normalize_erasing_regions(*self.tcx, self.param_env, value)
526526
.or_else(|e| {
527527
self.tcx.sess.delay_span_bug(
528-
DUMMY_SP,
528+
self.cur_span(),
529529
format!("failed to normalize {}", e.get_type_for_failure()).as_str(),
530530
);
531531

0 commit comments

Comments
 (0)