Skip to content

Commit b919df2

Browse files
authored
Rollup merge of #70590 - RalfJung:miri-backtrace, r=oli-obk
Miri: make backtrace function names and spans match up Currently, Miri backtraces are a bit confusing: ``` error: Undefined Behavior: entering unreachable code --> tests/compile-fail/never_transmute_void.rs:10:11 | 10 | match v {} //~ ERROR entering unreachable code | ^ entering unreachable code | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information note: inside call to `f` at tests/compile-fail/never_transmute_void.rs:17:5 --> tests/compile-fail/never_transmute_void.rs:17:5 | 17 | f(v); //~ inside call to `f` | ^^^^ = note: inside call to `main` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/rt.rs:67:34 = note: inside call to closure at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/rt.rs:52:73 = note: inside call to closure at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/sys_common/backtrace.rs:130:5 ``` When reading this like a normal backtrace, one would expect that e.g. the backrace involves the "main" function at "libstd/rt.rs:67:34". But that is not actually where we are in the main function, that is *where the main function is called*. This is not how backtraces are usually rendered (including e.g. with `RUST_BACKTRACE=1`). Usually we print next to each function name where inside that function the frame is currently executing, not where the *parent* frame is executing. With this PR and the Miri side at rust-lang/miri#1283, the backtrace now looks as follows: ``` error: Undefined Behavior: entering unreachable code --> tests/compile-fail/never_transmute_void.rs:10:11 | 10 | match v {} //~ ERROR entering unreachable code | ^ entering unreachable code | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: inside `f` at tests/compile-fail/never_transmute_void.rs:10:11 note: inside `main` at tests/compile-fail/never_transmute_void.rs:17:5 --> tests/compile-fail/never_transmute_void.rs:17:5 | 17 | f(v); //~ inside `main` | ^^^^ = note: inside closure at /home/r/src/rust/rustc/src/libstd/rt.rs:67:34 = note: inside closure at /home/r/src/rust/rustc/src/libstd/rt.rs:52:73 = note: inside `std::sys_common::backtrace::__rust_begin_short_backtrace::<[closure@DefId(1:6034 ~ std[87db]::rt[0]::lang_start_internal[0]::{{closure}}[0]::{{closure}}[0]) 0:&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe], i32>` at /home/r/src/rust/rustc/src/libstd/sys_common/backtrace.rs:130:5 ``` Now function name and printed line numbers match up in the notes. This code is partially shared with const-eval, so the change also affects const-eval: instead of printing what is being called at some span, we print which function/constant this span is inside. With this, we can also remove the `span` field from Miri's stack frames (which used to track the *caller span* of that frame, quite confusing), and then get of a whole lot of `span` arguments that ultimately just served to fill that field (and as a fallback for `caller_location`, which however was never actually used). r? @oli-obk
2 parents 0e0d84c + 96deb95 commit b919df2

File tree

15 files changed

+192
-161
lines changed

15 files changed

+192
-161
lines changed

src/librustc_middle/mir/interpret/error.rs

+9-13
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ pub struct ConstEvalErr<'tcx> {
5353

5454
#[derive(Debug)]
5555
pub struct FrameInfo<'tcx> {
56-
/// This span is in the caller.
57-
pub call_site: Span,
5856
pub instance: ty::Instance<'tcx>,
57+
pub span: Span,
5958
pub lint_root: Option<hir::HirId>,
6059
}
6160

@@ -65,12 +64,12 @@ impl<'tcx> fmt::Display for FrameInfo<'tcx> {
6564
if tcx.def_key(self.instance.def_id()).disambiguated_data.data
6665
== DefPathData::ClosureExpr
6766
{
68-
write!(f, "inside call to closure")?;
67+
write!(f, "inside closure")?;
6968
} else {
70-
write!(f, "inside call to `{}`", self.instance)?;
69+
write!(f, "inside `{}`", self.instance)?;
7170
}
72-
if !self.call_site.is_dummy() {
73-
let lo = tcx.sess.source_map().lookup_char_pos(self.call_site.lo());
71+
if !self.span.is_dummy() {
72+
let lo = tcx.sess.source_map().lookup_char_pos(self.span.lo());
7473
write!(f, " at {}:{}:{}", lo.file.name, lo.line, lo.col.to_usize() + 1)?;
7574
}
7675
Ok(())
@@ -168,13 +167,10 @@ impl<'tcx> ConstEvalErr<'tcx> {
168167
if let Some(span_msg) = span_msg {
169168
err.span_label(self.span, span_msg);
170169
}
171-
// Add spans for the stacktrace.
172-
// Skip the last, which is just the environment of the constant. The stacktrace
173-
// is sometimes empty because we create "fake" eval contexts in CTFE to do work
174-
// on constant values.
175-
if !self.stacktrace.is_empty() {
176-
for frame_info in &self.stacktrace[..self.stacktrace.len() - 1] {
177-
err.span_label(frame_info.call_site, frame_info.to_string());
170+
// Add spans for the stacktrace. Don't print a single-line backtrace though.
171+
if self.stacktrace.len() > 1 {
172+
for frame_info in &self.stacktrace {
173+
err.span_label(frame_info.span, frame_info.to_string());
178174
}
179175
}
180176
// Let the caller finish the job.

src/librustc_mir/const_eval/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ pub fn error_to_const_error<'mir, 'tcx, M: Machine<'mir, 'tcx>>(
5555
mut error: InterpErrorInfo<'tcx>,
5656
) -> ConstEvalErr<'tcx> {
5757
error.print_backtrace();
58-
let stacktrace = ecx.generate_stacktrace(None);
58+
let stacktrace = ecx.generate_stacktrace();
5959
ConstEvalErr { error: error.kind, stacktrace, span: ecx.tcx.span }
6060
}

src/librustc_mir/const_eval/eval_queries.rs

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ fn eval_body_using_ecx<'mir, 'tcx>(
4646

4747
ecx.push_stack_frame(
4848
cid.instance,
49-
body.span,
5049
body,
5150
Some(ret.into()),
5251
StackPopCleanup::None { cleanup: false },

src/librustc_mir/const_eval/machine.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ use std::hash::Hash;
88
use rustc_data_structures::fx::FxHashMap;
99

1010
use rustc_ast::ast::Mutability;
11+
use rustc_hir::def_id::DefId;
1112
use rustc_middle::mir::AssertMessage;
1213
use rustc_span::symbol::Symbol;
13-
use rustc_span::{def_id::DefId, Span};
1414

1515
use crate::interpret::{
1616
self, AllocId, Allocation, GlobalId, ImmTy, InterpCx, InterpResult, Memory, MemoryKind, OpTy,
@@ -64,7 +64,6 @@ impl<'mir, 'tcx> InterpCx<'mir, 'tcx, CompileTimeInterpreter> {
6464
/// If this returns successfully (`Ok`), the function should just be evaluated normally.
6565
fn hook_panic_fn(
6666
&mut self,
67-
span: Span,
6867
instance: ty::Instance<'tcx>,
6968
args: &[OpTy<'tcx>],
7069
) -> InterpResult<'tcx> {
@@ -77,7 +76,7 @@ impl<'mir, 'tcx> InterpCx<'mir, 'tcx, CompileTimeInterpreter> {
7776

7877
let msg_place = self.deref_operand(args[0])?;
7978
let msg = Symbol::intern(self.read_str(msg_place)?);
80-
let span = self.find_closest_untracked_caller_location().unwrap_or(span);
79+
let span = self.find_closest_untracked_caller_location();
8180
let (file, line, col) = self.location_triple_for_span(span);
8281
Err(ConstEvalErrKind::Panic { msg, file, line, col }.into())
8382
} else {
@@ -191,7 +190,6 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter {
191190

192191
fn find_mir_or_eval_fn(
193192
ecx: &mut InterpCx<'mir, 'tcx, Self>,
194-
span: Span,
195193
instance: ty::Instance<'tcx>,
196194
args: &[OpTy<'tcx>],
197195
ret: Option<(PlaceTy<'tcx>, mir::BasicBlock)>,
@@ -213,7 +211,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter {
213211
} else {
214212
// Some functions we support even if they are non-const -- but avoid testing
215213
// that for const fn!
216-
ecx.hook_panic_fn(span, instance, args)?;
214+
ecx.hook_panic_fn(instance, args)?;
217215
// We certainly do *not* want to actually call the fn
218216
// though, so be sure we return here.
219217
throw_unsup_format!("calling non-const function `{}`", instance)
@@ -248,13 +246,12 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter {
248246

249247
fn call_intrinsic(
250248
ecx: &mut InterpCx<'mir, 'tcx, Self>,
251-
span: Span,
252249
instance: ty::Instance<'tcx>,
253250
args: &[OpTy<'tcx>],
254251
ret: Option<(PlaceTy<'tcx>, mir::BasicBlock)>,
255252
_unwind: Option<mir::BasicBlock>,
256253
) -> InterpResult<'tcx> {
257-
if ecx.emulate_intrinsic(span, instance, args, ret)? {
254+
if ecx.emulate_intrinsic(instance, args, ret)? {
258255
return Ok(());
259256
}
260257
// An intrinsic that we do not support

src/librustc_mir/interpret/eval_context.rs

+7-26
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc_middle::ty::layout::{self, Align, HasDataLayout, LayoutOf, Size, TyAnd
1717
use rustc_middle::ty::query::TyCtxtAt;
1818
use rustc_middle::ty::subst::SubstsRef;
1919
use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable};
20-
use rustc_span::source_map::{self, Span, DUMMY_SP};
20+
use rustc_span::source_map::DUMMY_SP;
2121

2222
use super::{
2323
Immediate, MPlaceTy, Machine, MemPlace, MemPlaceMeta, Memory, OpTy, Operand, Place, PlaceTy,
@@ -57,9 +57,6 @@ pub struct Frame<'mir, 'tcx, Tag = (), Extra = ()> {
5757
/// The def_id and substs of the current function.
5858
pub instance: ty::Instance<'tcx>,
5959

60-
/// The span of the call site.
61-
pub span: source_map::Span,
62-
6360
/// Extra data for the machine.
6461
pub extra: Extra,
6562

@@ -502,7 +499,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
502499
pub fn push_stack_frame(
503500
&mut self,
504501
instance: ty::Instance<'tcx>,
505-
span: Span,
506502
body: &'mir mir::Body<'tcx>,
507503
return_place: Option<PlaceTy<'tcx, M::PointerTag>>,
508504
return_to_block: StackPopCleanup,
@@ -522,7 +518,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
522518
// empty local array, we fill it in below, after we are inside the stack frame and
523519
// all methods actually know about the frame
524520
locals: IndexVec::new(),
525-
span,
526521
instance,
527522
stmt: 0,
528523
extra,
@@ -541,7 +536,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
541536
// statics and constants don't have `Storage*` statements, no need to look for them
542537
Some(DefKind::Static) | Some(DefKind::Const) | Some(DefKind::AssocConst) => {}
543538
_ => {
544-
trace!("push_stack_frame: {:?}: num_bbs: {}", span, body.basic_blocks().len());
545539
for block in body.basic_blocks() {
546540
for stmt in block.statements.iter() {
547541
use rustc_middle::mir::StatementKind::{StorageDead, StorageLive};
@@ -859,33 +853,21 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
859853
}
860854
}
861855

862-
pub fn generate_stacktrace(&self, explicit_span: Option<Span>) -> Vec<FrameInfo<'tcx>> {
863-
let mut last_span = None;
856+
pub fn generate_stacktrace(&self) -> Vec<FrameInfo<'tcx>> {
864857
let mut frames = Vec::new();
865858
for frame in self.stack().iter().rev() {
866-
// make sure we don't emit frames that are duplicates of the previous
867-
if explicit_span == Some(frame.span) {
868-
last_span = Some(frame.span);
869-
continue;
870-
}
871-
if let Some(last) = last_span {
872-
if last == frame.span {
873-
continue;
874-
}
875-
} else {
876-
last_span = Some(frame.span);
877-
}
878-
879-
let lint_root = frame.current_source_info().and_then(|source_info| {
859+
let source_info = frame.current_source_info();
860+
let lint_root = source_info.and_then(|source_info| {
880861
match &frame.body.source_scopes[source_info.scope].local_data {
881862
mir::ClearCrossCrate::Set(data) => Some(data.lint_root),
882863
mir::ClearCrossCrate::Clear => None,
883864
}
884865
});
866+
let span = source_info.map_or(DUMMY_SP, |source_info| source_info.span);
885867

886-
frames.push(FrameInfo { call_site: frame.span, instance: frame.instance, lint_root });
868+
frames.push(FrameInfo { span, instance: frame.instance, lint_root });
887869
}
888-
trace!("generate stacktrace: {:#?}, {:?}", frames, explicit_span);
870+
trace!("generate stacktrace: {:#?}", frames);
889871
frames
890872
}
891873
}
@@ -899,7 +881,6 @@ where
899881
fn hash_stable(&self, hcx: &mut StableHashingContext<'ctx>, hasher: &mut StableHasher) {
900882
self.body.hash_stable(hcx, hasher);
901883
self.instance.hash_stable(hcx, hasher);
902-
self.span.hash_stable(hcx, hasher);
903884
self.return_to_block.hash_stable(hcx, hasher);
904885
self.return_place.as_ref().map(|r| &**r).hash_stable(hcx, hasher);
905886
self.locals.hash_stable(hcx, hasher);

src/librustc_mir/interpret/intrinsics.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use rustc_middle::ty::layout::{LayoutOf, Primitive, Size};
1515
use rustc_middle::ty::subst::SubstsRef;
1616
use rustc_middle::ty::TyCtxt;
1717
use rustc_span::symbol::{sym, Symbol};
18-
use rustc_span::Span;
1918

2019
use super::{ImmTy, InterpCx, Machine, OpTy, PlaceTy};
2120

@@ -78,7 +77,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
7877
/// Returns `true` if emulation happened.
7978
pub fn emulate_intrinsic(
8079
&mut self,
81-
span: Span,
8280
instance: ty::Instance<'tcx>,
8381
args: &[OpTy<'tcx, M::PointerTag>],
8482
ret: Option<(PlaceTy<'tcx, M::PointerTag>, mir::BasicBlock)>,
@@ -101,7 +99,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
10199
// `src/librustc_middle/ty/constness.rs`
102100
match intrinsic_name {
103101
sym::caller_location => {
104-
let span = self.find_closest_untracked_caller_location().unwrap_or(span);
102+
let span = self.find_closest_untracked_caller_location();
105103
let location = self.alloc_caller_location_for_span(span);
106104
self.write_scalar(location.ptr, dest)?;
107105
}
@@ -118,7 +116,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
118116
sym::needs_drop => self.tcx.types.bool,
119117
sym::type_id => self.tcx.types.u64,
120118
sym::type_name => self.tcx.mk_static_str(),
121-
_ => span_bug!(span, "Already checked for nullary intrinsics"),
119+
_ => bug!("already checked for nullary intrinsics"),
122120
};
123121
let val = self.const_eval(gid, ty)?;
124122
self.copy_op(val, dest)?;

src/librustc_mir/interpret/intrinsics/caller_location.rs

+15-12
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,21 @@ use crate::interpret::{
1212

1313
impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
1414
/// Walks up the callstack from the intrinsic's callsite, searching for the first callsite in a
15-
/// frame which is not `#[track_caller]`. If the first frame found lacks `#[track_caller]`, then
16-
/// `None` is returned and the callsite of the function invocation itself should be used.
17-
crate fn find_closest_untracked_caller_location(&self) -> Option<Span> {
18-
let mut caller_span = None;
19-
for next_caller in self.stack.iter().rev() {
20-
if !next_caller.instance.def.requires_caller_location(*self.tcx) {
21-
return caller_span;
22-
}
23-
caller_span = Some(next_caller.span);
24-
}
25-
26-
caller_span
15+
/// frame which is not `#[track_caller]`.
16+
crate fn find_closest_untracked_caller_location(&self) -> Span {
17+
self.stack
18+
.iter()
19+
.rev()
20+
// Find first non-`#[track_caller]` frame.
21+
.find(|frame| !frame.instance.def.requires_caller_location(*self.tcx))
22+
// Assert that there is always such a frame.
23+
.unwrap()
24+
.current_source_info()
25+
// Assert that the frame we look at is actually executing code currently
26+
// (`current_source_info` is None when we are unwinding and the frame does
27+
// not require cleanup).
28+
.unwrap()
29+
.span
2730
}
2831

2932
/// Allocate a `const core::panic::Location` with the provided filename and line/column numbers.

src/librustc_mir/interpret/machine.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::hash::Hash;
77

88
use rustc_middle::mir;
99
use rustc_middle::ty::{self, Ty};
10-
use rustc_span::{def_id::DefId, Span};
10+
use rustc_span::def_id::DefId;
1111

1212
use super::{
1313
AllocId, Allocation, AllocationExtra, Frame, ImmTy, InterpCx, InterpResult, Memory, MemoryKind,
@@ -135,7 +135,6 @@ pub trait Machine<'mir, 'tcx>: Sized {
135135
/// was used.
136136
fn find_mir_or_eval_fn(
137137
ecx: &mut InterpCx<'mir, 'tcx, Self>,
138-
span: Span,
139138
instance: ty::Instance<'tcx>,
140139
args: &[OpTy<'tcx, Self::PointerTag>],
141140
ret: Option<(PlaceTy<'tcx, Self::PointerTag>, mir::BasicBlock)>,
@@ -156,7 +155,6 @@ pub trait Machine<'mir, 'tcx>: Sized {
156155
/// responsibility to advance the instruction pointer as appropriate.
157156
fn call_intrinsic(
158157
ecx: &mut InterpCx<'mir, 'tcx, Self>,
159-
span: Span,
160158
instance: ty::Instance<'tcx>,
161159
args: &[OpTy<'tcx, Self::PointerTag>],
162160
ret: Option<(PlaceTy<'tcx, Self::PointerTag>, mir::BasicBlock)>,

src/librustc_mir/interpret/terminator.rs

+5-17
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::convert::TryFrom;
44
use rustc_middle::ty::layout::{self, LayoutOf, TyAndLayout};
55
use rustc_middle::ty::Instance;
66
use rustc_middle::{mir, ty};
7-
use rustc_span::source_map::Span;
87
use rustc_target::spec::abi::Abi;
98

109
use super::{
@@ -71,14 +70,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
7170
Some((dest, ret)) => Some((self.eval_place(dest)?, ret)),
7271
None => None,
7372
};
74-
self.eval_fn_call(
75-
fn_val,
76-
terminator.source_info.span,
77-
abi,
78-
&args[..],
79-
ret,
80-
*cleanup,
81-
)?;
73+
self.eval_fn_call(fn_val, abi, &args[..], ret, *cleanup)?;
8274
}
8375

8476
Drop { location, target, unwind } => {
@@ -88,7 +80,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
8880
trace!("TerminatorKind::drop: {:?}, type {}", location, ty);
8981

9082
let instance = Instance::resolve_drop_in_place(*self.tcx, ty);
91-
self.drop_in_place(place, instance, terminator.source_info.span, target, unwind)?;
83+
self.drop_in_place(place, instance, target, unwind)?;
9284
}
9385

9486
Assert { ref cond, expected, ref msg, target, cleanup } => {
@@ -196,7 +188,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
196188
fn eval_fn_call(
197189
&mut self,
198190
fn_val: FnVal<'tcx, M::ExtraFnVal>,
199-
span: Span,
200191
caller_abi: Abi,
201192
args: &[OpTy<'tcx, M::PointerTag>],
202193
ret: Option<(PlaceTy<'tcx, M::PointerTag>, mir::BasicBlock)>,
@@ -242,7 +233,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
242233
match instance.def {
243234
ty::InstanceDef::Intrinsic(..) => {
244235
assert!(caller_abi == Abi::RustIntrinsic || caller_abi == Abi::PlatformIntrinsic);
245-
M::call_intrinsic(self, span, instance, args, ret, unwind)
236+
M::call_intrinsic(self, instance, args, ret, unwind)
246237
}
247238
ty::InstanceDef::VtableShim(..)
248239
| ty::InstanceDef::ReifyShim(..)
@@ -252,14 +243,13 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
252243
| ty::InstanceDef::CloneShim(..)
253244
| ty::InstanceDef::Item(_) => {
254245
// We need MIR for this fn
255-
let body = match M::find_mir_or_eval_fn(self, span, instance, args, ret, unwind)? {
246+
let body = match M::find_mir_or_eval_fn(self, instance, args, ret, unwind)? {
256247
Some(body) => body,
257248
None => return Ok(()),
258249
};
259250

260251
self.push_stack_frame(
261252
instance,
262-
span,
263253
body,
264254
ret.map(|p| p.0),
265255
StackPopCleanup::Goto { ret: ret.map(|p| p.1), unwind },
@@ -407,7 +397,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
407397
OpTy::from(ImmTy { layout: this_receiver_ptr, imm: receiver_place.ptr.into() });
408398
trace!("Patched self operand to {:#?}", args[0]);
409399
// recurse with concrete function
410-
self.eval_fn_call(drop_fn, span, caller_abi, &args, ret, unwind)
400+
self.eval_fn_call(drop_fn, caller_abi, &args, ret, unwind)
411401
}
412402
}
413403
}
@@ -416,7 +406,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
416406
&mut self,
417407
place: PlaceTy<'tcx, M::PointerTag>,
418408
instance: ty::Instance<'tcx>,
419-
span: Span,
420409
target: mir::BasicBlock,
421410
unwind: Option<mir::BasicBlock>,
422411
) -> InterpResult<'tcx> {
@@ -444,7 +433,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
444433

445434
self.eval_fn_call(
446435
FnVal::Instance(instance),
447-
span,
448436
Abi::Rust,
449437
&[arg.into()],
450438
Some((dest.into(), target)),

0 commit comments

Comments
 (0)